Comparing version 1.4.1 to 1.4.2
@@ -114,2 +114,6 @@ "use strict"; | ||
}, | ||
creditcard: { | ||
text: '0000 0000 0000 0000 00/00 000', | ||
textMask: [/\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, /\d/, /\d/, '0', /\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, '/', /\d/, /\d/, ' ', /\d/, /\d/, /\d/] | ||
}, | ||
utils: { | ||
@@ -116,0 +120,0 @@ numberToString: function (n) { |
@@ -14,2 +14,3 @@ "use strict"; | ||
chai_1.expect(index_1.validateBr.cpf('127.529.875-36')).to.be.true; | ||
chai_1.expect(index_1.validateBr.cpf('090.988.020-44')).to.be.true; | ||
chai_1.expect(index_1.validateBr.cpf('127.529.875-46')).to.be.false; | ||
@@ -16,0 +17,0 @@ chai_1.expect(index_1.validateBr.cpf('127.529.875-37')).to.be.false; |
{ | ||
"name": "js-brasil", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Javascript Utils para Brasil (cpf, cnpj...)", | ||
@@ -12,3 +12,3 @@ "main": "dist/index.js", | ||
"browserify": "browserify dist/index.js --standalone jsbrasil -o js-brasil.js", | ||
"dist": "npm run build && npm run browserify", | ||
"dist": "npm run build && npm run browserify && cp js-brasil.js dist/", | ||
"publish-npm": "npm run dist && npm publish", | ||
@@ -15,0 +15,0 @@ "demo": "cp js-brasil.js demo/ && cd demo && http-server", |
@@ -111,2 +111,6 @@ import { isArray, processCaretTraps } from './utils'; | ||
}, | ||
creditcard: { | ||
text: '0000 0000 0000 0000 00/00 000', | ||
textMask: [/\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, /\d/, /\d/, '0', /\d/, /\d/, /\d/, /\d/, ' ', /\d/, /\d/, '/', /\d/, /\d/, ' ', /\d/, /\d/, /\d/] | ||
}, | ||
utils: { | ||
@@ -161,3 +165,3 @@ numberToString: (n: number) => { | ||
currency: (currencyValueInput: string | number) => { | ||
if (!currencyValueInput) { | ||
@@ -169,3 +173,3 @@ return ''; | ||
if(typeof currencyValueInput === 'number'){ | ||
if (typeof currencyValueInput === 'number') { | ||
currencyValue = currencyValue.replace('.', ','); | ||
@@ -365,3 +369,3 @@ } | ||
isNew = shift.isNew; | ||
} | ||
} | ||
@@ -368,0 +372,0 @@ // If the character we got from the user input is a placeholder character (which happens |
@@ -15,2 +15,3 @@ import { validateBr } from '../index'; | ||
expect(validateBr.cpf('127.529.875-36')).to.be.true; | ||
expect(validateBr.cpf('090.988.020-44')).to.be.true; | ||
expect(validateBr.cpf('127.529.875-46')).to.be.false; | ||
@@ -17,0 +18,0 @@ expect(validateBr.cpf('127.529.875-37')).to.be.false; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
926553
15970