Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-brasil

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-brasil - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

dist/js-brasil.js

7

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc