Sep 20, 2019
What is Utils-Do and how it might help you with an application for Dominican Republic?
On one occasion I was developing a local web application, which one of its requirements was to segment its users by municipality. As a result, I tried to find some kind of package that would help me to speed up the process of developing this application, which would operate in the Dominican Republic where I was born and currently living.
As expected, I found nothing. That is why it occurred to me to take the initiative and there create the project of Utils-Do
What is Utils-DO?
It is a package written in JavaScript whose purpose is to provide functions that we commonly use when creating an application focused on the local Dominican market.
What can you do?
Currently it exports two main objects:
- Geo
It handles all the methods related to geographic information of the country.
Their methods range from obtaining an array with all the provinces, to finding a specific municipality.
const {Geo} = require ("utils-do")
Geo.getProvinces () // ["Azua", "Bahoruco", "Barahona", "Dajabón", "Duarte", "El Seibo", "Elías Piña", "Espaillat", "Hato Mayor", ...]
Geo.getMunicipalitiesOf ("La Romana") // Object {Guaymate: [], La Romana: ["Caleta"], Villa Hermosa: ["Cumayasa"]}
Geo.getProvinceByMunicipality ("Santo Domingo Este") // ["Santo Domingo"]
- Validator
It handles the data patterns that are used in the country.
Their methods verify data such as a Card ID number or telephone number according to the known pattern.
const {Validator} = require ("utils-do")
Validator.isAnIde ("DO45879189") // false
Validator.isATel ("8095564125") // true
Validator.formatToTel ("8095564125") // "(809) 556-4125"
What is the purpose of this repository?
This is an Open Source project created to have all the functions that we'll need when we're building an application for the Dominican market.
This library is written only JavaScript and does not contain any dependencies with others packages.
You can read more information about this wonderful package, you can access npm or github.