Comparing version 1.0.3 to 1.0.4
@@ -6,3 +6,4 @@ "use strict"; | ||
var inscricaoestadual_1 = require("./src/inscricaoestadual"); | ||
exports.validate = { | ||
var faker_1 = require("./src/faker"); | ||
exports.validateBr = { | ||
cep: validate_1.valida_cep, | ||
@@ -20,3 +21,3 @@ cnpj: validate_1.validate_cnpj, | ||
}; | ||
exports.utils = { | ||
exports.utilsBr = { | ||
isPresent: utils_1.isPresent, | ||
@@ -26,4 +27,4 @@ MASKS: utils_1.MASKS | ||
exports.default = { | ||
validate: exports.validate, utils: exports.utils | ||
validateBr: exports.validateBr, utilsBr: exports.utilsBr, fakerBr: faker_1.fakerBr | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -9,4 +9,5 @@ import { | ||
import { validar } from './src/inscricaoestadual'; | ||
import { fakerBr } from './src/faker'; | ||
export const validate = { | ||
export const validateBr = { | ||
cep: valida_cep, | ||
@@ -25,3 +26,3 @@ cnpj: validate_cnpj, | ||
export const utils = { | ||
export const utilsBr = { | ||
isPresent, | ||
@@ -32,3 +33,3 @@ MASKS | ||
export default { | ||
validate, utils | ||
validateBr, utilsBr, fakerBr | ||
} |
{ | ||
"name": "js-brasil", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Javascript Utils para Brasil (cpf, cnpj...)", | ||
@@ -8,4 +8,5 @@ "main": "dist/index.js", | ||
"build": "tsc", | ||
"publish": "npm publish", | ||
"test": "mocha" | ||
"test": "mocha", | ||
"browserify": "browserify dist/index.js --standalone jsbrasil -o js-brasil.js", | ||
"dist": "npm run build && npm run browserify" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
# js-brasil | ||
Javascript Utils para Brasil (cpf, cnpj...) | ||
# Validate | ||
Verifique se os dados dos seus usuários são válidos | ||
Javascript: | ||
```js | ||
const { validateBr } = require('js-brasil'); | ||
const cpf = validateBr.cpf('123.456.789-00'); | ||
``` | ||
Typescript: | ||
```ts | ||
import { validateBr } from 'js-brasil'; | ||
const cpf = validateBr.cpf('123.456.789-00'); | ||
``` | ||
Browser: | ||
```html | ||
<script src="js-brasil.js"> | ||
<script> | ||
var cpf = jsbrasil.validateBr.cpf('123.456.789-00') | ||
</script> | ||
``` | ||
# Faker | ||
Gere dados de teste usando tipos de dados brasileiro, similar o fakejs | ||
Javascript: | ||
```js | ||
const { fakerBr } = require('js-brasil'); | ||
const cep = fakerBr.cep(); | ||
``` | ||
Typescript: | ||
```ts | ||
import { fakerBr } from 'js-brasil'; | ||
const cep = fakerBr.cep(); | ||
``` | ||
Browser: | ||
```html | ||
<script src="js-brasil.js"> | ||
<script> | ||
var cep = jsbrasil.fakerBr.cep(') | ||
</script> | ||
``` | ||
# Tipos Suportados | ||
* cep | ||
* cnpj | ||
* cpf | ||
* currency | ||
* inscricaoestadual - Todos os estados do Brasil | ||
* percentage | ||
* rg | ||
* placa | ||
* telefone | ||
* time | ||
* titulo |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
189709
23
4497
67
4