node-cep-util
v1.1.0
Published
Funções utilitárias para tratamento de CEP
Downloads
208
Readme
cep-util
Funções utilitárias para tratamento de CEPs
Pague-me um café
Se este componente foi útil para você, ou para algum de seus projetos, por favor ajude a apoiar o meu trabalho clicando no botão abaixo e fazendo uma doação via PayPal:
Installation
npm install node-cep-util --save
Examples
CEP Mask
const cep = require('node-cep-util');
cep.mask('05010000'); // returns '05010-000'
CEP UnMask
const cep = require('node-cep-util');
cep.unMask('05010-000'); // returns '05010000'
CEP Is Masked
const cep = require('node-cep-util');
cep.isMasked('05010-000'); // returns TRUE
cep.isMasked('05010000'); // returns FALSE
Test and development
- Install external dependencies:
npm install
- Run the test suite without coverage:
npm test
- Run the test suite with coverage:
npm run testdox
How to Contribute
- Open a pull request or an issue about what you want to implement / change. We're glad for any help!
- Please be aware that we'll only accept fully tested code.
Contributors
- Leonardo Thibes [email protected]
LICENSE
Copyright (c) 2018 Leonardo Thibes
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.