br-validations
Advanced tools
Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "br-validations", | ||
"version": "0.2.2", | ||
"version": "0.2.4", | ||
"description": "A library of validations applicable to several Brazilian data like I.E., CNPJ, CPF and others", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/the-darc/br-validations", |
@@ -27,22 +27,25 @@ var gulp = require('gulp'), | ||
' */', | ||
'(function () {', | ||
' var root = this;', | ||
'(function (root, factory) {', | ||
' if (typeof define === \'function\' && define.amd) {', | ||
' // AMD. Register as an anonymous module.', | ||
' define([], factory);', | ||
' } else if (typeof exports === \'object\') {', | ||
' // Node. Does not work with strict CommonJS, but', | ||
' // only CommonJS-like environments that support module.exports,', | ||
' // like Node.', | ||
' module.exports = factory();', | ||
' } else {', | ||
' // Browser globals (root is window)', | ||
' root.BrV = factory();', | ||
' }', | ||
'}(this, function () {', | ||
''].join('\n'); | ||
var footer = ['', | ||
'var BrV = {', | ||
' ie: IE,', | ||
' cpf: CPF,', | ||
' cnpj: CNPJ', | ||
'};', | ||
'var objectTypes = {', | ||
' \'function\': true,', | ||
' \'object\': true', | ||
'};', | ||
'if (objectTypes[typeof module]) {', | ||
' module.exports = BrV; ', | ||
'} else {', | ||
' root.BrV = BrV;', | ||
'}', | ||
'}.call(this));'].join('\n'); | ||
' return {', | ||
' ie: IE,', | ||
' cpf: CPF,', | ||
' cnpj: CNPJ', | ||
' };', | ||
'}));'].join('\n'); | ||
@@ -49,0 +52,0 @@ gulp.src(path.src.files) |
{ | ||
"name": "br-validations", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A library of validations applicable to several Brazilian data like I.E., CNPJ, CPF and others", | ||
@@ -5,0 +5,0 @@ "id": "/br-validations", |
/** | ||
* br-validations | ||
* A library of validations applicable to several Brazilian data like I.E., CNPJ, CPF and others | ||
* @version v0.2.2 | ||
* @version v0.2.4 | ||
* @link http://github.com/the-darc/br-validations | ||
* @license MIT | ||
*/ | ||
(function () { | ||
var root = this; | ||
(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD. Register as an anonymous module. | ||
define([], factory); | ||
} else if (typeof exports === 'object') { | ||
// Node. Does not work with strict CommonJS, but | ||
// only CommonJS-like environments that support module.exports, | ||
// like Node. | ||
module.exports = factory(); | ||
} else { | ||
// Browser globals (root is window) | ||
root.BrV = factory(); | ||
} | ||
}(this, function () { | ||
var CNPJ = {}; | ||
@@ -626,16 +638,7 @@ | ||
var BrV = { | ||
ie: IE, | ||
cpf: CPF, | ||
cnpj: CNPJ | ||
}; | ||
var objectTypes = { | ||
'function': true, | ||
'object': true | ||
}; | ||
if (objectTypes[typeof module]) { | ||
module.exports = BrV; | ||
} else { | ||
root.BrV = BrV; | ||
} | ||
}.call(this)); | ||
return { | ||
ie: IE, | ||
cpf: CPF, | ||
cnpj: CNPJ | ||
}; | ||
})); |
@@ -1,1 +0,1 @@ | ||
(function(){function s(s,t){var o=t.algorithmSteps,r=u.handleStr[o[0]](s),e=u.sum[o[1]](r,t.pesos),n=u.rest[o[2]](e),m=parseInt(r[t.dvpos]),a=u.expectedDV[o[3]](n,r);return m===a}function t(t,o){if(o.match&&!o.match.test(t))return!1;for(var r=0;r<o.dvs.length;r++)if(!s(t,o.dvs[r]))return!1;return!0}var o=this,r={};r.validate=function(s){var t=[6,5,4,3,2,9,8,7,6,5,4,3,2];s=s.replace(/[^\d]/g,"");var o=/^(0{14}|1{14}|2{14}|3{14}|4{14}|5{14}|6{14}|7{14}|8{14}|9{14})$/;if(!s||14!==s.length||o.test(s))return!1;s=s.split("");for(var r=0,e=0;12>r;r++)e+=s[r]*t[r+1];if(e=11-e%11,e=e>=10?0:e,parseInt(s[12])!==e)return!1;for(r=0,e=0;12>=r;r++)e+=s[r]*t[r];return e=11-e%11,e=e>=10?0:e,parseInt(s[13])!==e?!1:!0};var e={};e.validate=function(s){function t(t){for(var o=0,r=t-9,e=0;9>e;e++)o+=parseInt(s.charAt(e+r))*(e+1);return o%11%10===parseInt(s.charAt(t))}s=s.replace(/[^\d]+/g,"");var o=/^(0{11}|1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11})$/;return!s||11!==s.length||o.test(s)?!1:t(9)&&t(10)};var n=function(s){return this instanceof n?(this.rules=m[s]||[],this.rule,n.prototype._defineRule=function(s){this.rule=void 0;for(var t=0;t<this.rules.length&&void 0===this.rule;t++){var o=s.replace(/[^\d]/g,""),r=this.rules[t];o.length!==r.chars||r.match&&!r.match.test(s)||(this.rule=r)}return!!this.rule},n.prototype.validate=function(s){return s&&this._defineRule(s)?this.rule.validate(s):!1},void 0):new n(s)},m={},u={handleStr:{onlyNumbers:function(s){return s.replace(/[^\d]/g,"").split("")},mgSpec:function(s){var t=s.replace(/[^\d]/g,"");return t=t.substr(0,3)+"0"+t.substr(3,t.length),t.split("")}},sum:{normalSum:function(s,t){for(var o=s,r=0,e=0;e<t.length;e++)r+=parseInt(o[e])*t[e];return r},individualSum:function(s,t){for(var o=s,r=0,e=0;e<t.length;e++){var n=parseInt(o[e])*t[e];r+=n%10+parseInt(n/10)}return r},apSpec:function(s,t){var o=this.normalSum(s,t),r=s.join("");return r>="030000010"&&"030170009">=r?o+5:r>="030170010"&&"030190229">=r?o+9:o}},rest:{mod11:function(s){return s%11},mod10:function(s){return s%10},mod9:function(s){return s%9}},expectedDV:{minusRestOf11:function(s){return 2>s?0:11-s},minusRestOf11v2:function(s){return 2>s?11-s-10:11-s},minusRestOf10:function(s){return 1>s?0:10-s},mod10:function(s){return s%10},goSpec:function(s,t){var o=t.join("");return 1===s?o>="101031050"&&"101199979">=o?1:0:0===s?0:11-s},apSpec:function(s,t){var o=t.join("");return 0===s?o>="030170010"&&"030190229">=o?1:0:1===s?0:11-s},voidFn:function(s){return s}}};m.PE=[{chars:9,dvs:[{dvpos:7,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:14,pesos:[[1,2,3,4,5,9,8,7,6,5,4,3,2]],dvs:[{dvpos:13,pesos:[5,4,3,2,1,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11v2"]}],validate:function(s){return t(s,this)}}],m.RS=[{chars:10,dvs:[{dvpos:9,pesos:[2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.AC=[{chars:13,match:/^01/,dvs:[{dvpos:11,pesos:[4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:12,pesos:[5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.MG=[{chars:13,dvs:[{dvpos:12,pesos:[1,2,1,2,1,2,1,2,1,2,1,2],algorithmSteps:["mgSpec","individualSum","mod10","minusRestOf10"]},{dvpos:12,pesos:[3,2,11,10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.SP=[{chars:12,match:/^[0-9]/,dvs:[{dvpos:8,pesos:[1,3,4,5,6,7,8,10],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]},{dvpos:11,pesos:[3,2,10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]}],validate:function(s){return t(s,this)}},{chars:12,match:/^P/i,dvs:[{dvpos:8,pesos:[1,3,4,5,6,7,8,10],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]}],validate:function(s){return t(s,this)}}],m.DF=[{chars:13,dvs:[{dvpos:11,pesos:[4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:12,pesos:[5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.ES=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.BA=[{chars:8,match:/^[0123458]/,dvs:[{dvpos:7,pesos:[7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]},{dvpos:6,pesos:[8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]}],validate:function(s){return t(s,this)}},{chars:8,match:/^[679]/,dvs:[{dvpos:7,pesos:[7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:6,pesos:[8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:9,match:/^[0-9][0123458]/,dvs:[{dvpos:8,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]},{dvpos:7,pesos:[9,8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]}],validate:function(s){return t(s,this)}},{chars:9,match:/^[0-9][679]/,dvs:[{dvpos:8,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:7,pesos:[9,8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.AM=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.RN=[{chars:9,match:/^20/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:10,match:/^20/,dvs:[{dvpos:8,pesos:[10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.RO=[{chars:14,dvs:[{dvpos:13,pesos:[6,5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.PR=[{chars:10,dvs:[{dvpos:8,pesos:[3,2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:9,pesos:[4,3,2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.SC=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.RJ=[{chars:8,dvs:[{dvpos:7,pesos:[2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.PA=[{chars:9,match:/^15/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.SE=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.PB=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.CE=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.PI=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.MA=[{chars:9,match:/^12/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.MT=[{chars:11,dvs:[{dvpos:10,pesos:[3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.MS=[{chars:9,match:/^28/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.TO=[{chars:11,match:/^[0-9]{2}((0[123])|(99))/,dvs:[{dvpos:10,pesos:[9,8,0,0,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.AL=[{chars:9,match:/^24[03578]/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],m.RR=[{chars:9,match:/^24/,dvs:[{dvpos:8,pesos:[1,2,3,4,5,6,7,8],algorithmSteps:["onlyNumbers","normalSum","mod9","voidFn"]}],validate:function(s){return t(s,this)}}],m.GO=[{chars:9,match:/^1[015]/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","goSpec"]}],validate:function(s){return t(s,this)}}],m.AP=[{chars:9,match:/^03/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","apSpec","mod11","apSpec"]}],validate:function(s){return t(s,this)}}];var a={ie:n,cpf:e,cnpj:r},i={"function":!0,object:!0};i[typeof module]?module.exports=a:o.BrV=a}).call(this); | ||
!function(s,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():s.BrV=t()}(this,function(){function s(s,t){var o=t.algorithmSteps,e=m.handleStr[o[0]](s),r=m.sum[o[1]](e,t.pesos),n=m.rest[o[2]](r),u=parseInt(e[t.dvpos]),a=m.expectedDV[o[3]](n,e);return u===a}function t(t,o){if(o.match&&!o.match.test(t))return!1;for(var e=0;e<o.dvs.length;e++)if(!s(t,o.dvs[e]))return!1;return!0}var o={};o.validate=function(s){var t=[6,5,4,3,2,9,8,7,6,5,4,3,2];s=s.replace(/[^\d]/g,"");var o=/^(0{14}|1{14}|2{14}|3{14}|4{14}|5{14}|6{14}|7{14}|8{14}|9{14})$/;if(!s||14!==s.length||o.test(s))return!1;s=s.split("");for(var e=0,r=0;12>e;e++)r+=s[e]*t[e+1];if(r=11-r%11,r=r>=10?0:r,parseInt(s[12])!==r)return!1;for(e=0,r=0;12>=e;e++)r+=s[e]*t[e];return r=11-r%11,r=r>=10?0:r,parseInt(s[13])!==r?!1:!0};var e={};e.validate=function(s){function t(t){for(var o=0,e=t-9,r=0;9>r;r++)o+=parseInt(s.charAt(r+e))*(r+1);return o%11%10===parseInt(s.charAt(t))}s=s.replace(/[^\d]+/g,"");var o=/^(0{11}|1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11})$/;return!s||11!==s.length||o.test(s)?!1:t(9)&&t(10)};var r=function(s){return this instanceof r?(this.rules=n[s]||[],this.rule,r.prototype._defineRule=function(s){this.rule=void 0;for(var t=0;t<this.rules.length&&void 0===this.rule;t++){var o=s.replace(/[^\d]/g,""),e=this.rules[t];o.length!==e.chars||e.match&&!e.match.test(s)||(this.rule=e)}return!!this.rule},r.prototype.validate=function(s){return s&&this._defineRule(s)?this.rule.validate(s):!1},void 0):new r(s)},n={},m={handleStr:{onlyNumbers:function(s){return s.replace(/[^\d]/g,"").split("")},mgSpec:function(s){var t=s.replace(/[^\d]/g,"");return t=t.substr(0,3)+"0"+t.substr(3,t.length),t.split("")}},sum:{normalSum:function(s,t){for(var o=s,e=0,r=0;r<t.length;r++)e+=parseInt(o[r])*t[r];return e},individualSum:function(s,t){for(var o=s,e=0,r=0;r<t.length;r++){var n=parseInt(o[r])*t[r];e+=n%10+parseInt(n/10)}return e},apSpec:function(s,t){var o=this.normalSum(s,t),e=s.join("");return e>="030000010"&&"030170009">=e?o+5:e>="030170010"&&"030190229">=e?o+9:o}},rest:{mod11:function(s){return s%11},mod10:function(s){return s%10},mod9:function(s){return s%9}},expectedDV:{minusRestOf11:function(s){return 2>s?0:11-s},minusRestOf11v2:function(s){return 2>s?11-s-10:11-s},minusRestOf10:function(s){return 1>s?0:10-s},mod10:function(s){return s%10},goSpec:function(s,t){var o=t.join("");return 1===s?o>="101031050"&&"101199979">=o?1:0:0===s?0:11-s},apSpec:function(s,t){var o=t.join("");return 0===s?o>="030170010"&&"030190229">=o?1:0:1===s?0:11-s},voidFn:function(s){return s}}};return n.PE=[{chars:9,dvs:[{dvpos:7,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:14,pesos:[[1,2,3,4,5,9,8,7,6,5,4,3,2]],dvs:[{dvpos:13,pesos:[5,4,3,2,1,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11v2"]}],validate:function(s){return t(s,this)}}],n.RS=[{chars:10,dvs:[{dvpos:9,pesos:[2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.AC=[{chars:13,match:/^01/,dvs:[{dvpos:11,pesos:[4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:12,pesos:[5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.MG=[{chars:13,dvs:[{dvpos:12,pesos:[1,2,1,2,1,2,1,2,1,2,1,2],algorithmSteps:["mgSpec","individualSum","mod10","minusRestOf10"]},{dvpos:12,pesos:[3,2,11,10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.SP=[{chars:12,match:/^[0-9]/,dvs:[{dvpos:8,pesos:[1,3,4,5,6,7,8,10],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]},{dvpos:11,pesos:[3,2,10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]}],validate:function(s){return t(s,this)}},{chars:12,match:/^P/i,dvs:[{dvpos:8,pesos:[1,3,4,5,6,7,8,10],algorithmSteps:["onlyNumbers","normalSum","mod11","mod10"]}],validate:function(s){return t(s,this)}}],n.DF=[{chars:13,dvs:[{dvpos:11,pesos:[4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:12,pesos:[5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.ES=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.BA=[{chars:8,match:/^[0123458]/,dvs:[{dvpos:7,pesos:[7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]},{dvpos:6,pesos:[8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]}],validate:function(s){return t(s,this)}},{chars:8,match:/^[679]/,dvs:[{dvpos:7,pesos:[7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:6,pesos:[8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:9,match:/^[0-9][0123458]/,dvs:[{dvpos:8,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]},{dvpos:7,pesos:[9,8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod10","minusRestOf10"]}],validate:function(s){return t(s,this)}},{chars:9,match:/^[0-9][679]/,dvs:[{dvpos:8,pesos:[8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:7,pesos:[9,8,7,6,5,4,3,0,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.AM=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.RN=[{chars:9,match:/^20/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}},{chars:10,match:/^20/,dvs:[{dvpos:8,pesos:[10,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.RO=[{chars:14,dvs:[{dvpos:13,pesos:[6,5,4,3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.PR=[{chars:10,dvs:[{dvpos:8,pesos:[3,2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]},{dvpos:9,pesos:[4,3,2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.SC=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.RJ=[{chars:8,dvs:[{dvpos:7,pesos:[2,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.PA=[{chars:9,match:/^15/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.SE=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.PB=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.CE=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.PI=[{chars:9,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.MA=[{chars:9,match:/^12/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.MT=[{chars:11,dvs:[{dvpos:10,pesos:[3,2,9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.MS=[{chars:9,match:/^28/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.TO=[{chars:11,match:/^[0-9]{2}((0[123])|(99))/,dvs:[{dvpos:10,pesos:[9,8,0,0,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.AL=[{chars:9,match:/^24[03578]/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","minusRestOf11"]}],validate:function(s){return t(s,this)}}],n.RR=[{chars:9,match:/^24/,dvs:[{dvpos:8,pesos:[1,2,3,4,5,6,7,8],algorithmSteps:["onlyNumbers","normalSum","mod9","voidFn"]}],validate:function(s){return t(s,this)}}],n.GO=[{chars:9,match:/^1[015]/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","normalSum","mod11","goSpec"]}],validate:function(s){return t(s,this)}}],n.AP=[{chars:9,match:/^03/,dvs:[{dvpos:8,pesos:[9,8,7,6,5,4,3,2],algorithmSteps:["onlyNumbers","apSpec","mod11","apSpec"]}],validate:function(s){return t(s,this)}}],{ie:r,cpf:e,cnpj:o}}); |
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
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
75044
1934