@brazilian-utils/formatters
Advanced tools
Comparing version 0.1.6 to 0.1.8
@@ -1,2 +0,2 @@ | ||
var r=11,e=[2,5],n=[8];var t=14,i=[1,4],u=[7],f=[11];exports.formatCpf=function(t){if(!t)return"";var i=String(t).replace(/[^\d]/g,"");return i.slice(0,r).split("").reduce(function(r,t,u){var f=""+r+t;if(u!==i.length-1){if(e.includes(u))return f+".";if(n.includes(u))return f+"-"}return f},"")},exports.formatCnpj=function(r){if(!r)return"";var e=String(r).replace(/[^\d]/g,"");return e.slice(0,t).split("").reduce(function(r,n,t){var c=""+r+n;if(t!==e.length-1){if(i.includes(t))return c+".";if(u.includes(t))return c+"/";if(f.includes(t))return c+"-"}return c},"")}; | ||
function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var t=r(require("@brazilian-utils/format-cpf")),a=r(require("@brazilian-utils/format-cnpj"));exports.formatCpf=t,exports.formatCnpj=a; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var r=11,e=[2,5],n=[8];function i(i){if(!i)return"";var t=String(i).replace(/[^\d]/g,"");return t.slice(0,r).split("").reduce(function(r,i,u){var f=""+r+i;if(u!==t.length-1){if(e.includes(u))return f+".";if(n.includes(u))return f+"-"}return f},"")}var t=14,u=[1,4],f=[7],c=[11];function l(r){if(!r)return"";var e=String(r).replace(/[^\d]/g,"");return e.slice(0,t).split("").reduce(function(r,n,i){var t=""+r+n;if(i!==e.length-1){if(u.includes(i))return t+".";if(f.includes(i))return t+"/";if(c.includes(i))return t+"-"}return t},"")}export{i as formatCpf,l as formatCnpj}; | ||
export{default as formatCpf}from"@brazilian-utils/format-cpf";export{default as formatCnpj}from"@brazilian-utils/format-cnpj"; | ||
//# sourceMappingURL=index.m.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.formatters={})}(this,function(e){var r=11,n=[2,5],t=[8];var i=14,f=[1,4],u=[7],c=[11];e.formatCpf=function(e){if(!e)return"";var i=String(e).replace(/[^\d]/g,"");return i.slice(0,r).split("").reduce(function(e,r,f){var u=""+e+r;if(f!==i.length-1){if(n.includes(f))return u+".";if(t.includes(f))return u+"-"}return u},"")},e.formatCnpj=function(e){if(!e)return"";var r=String(e).replace(/[^\d]/g,"");return r.slice(0,i).split("").reduce(function(e,n,t){var i=""+e+n;if(t!==r.length-1){if(f.includes(t))return i+".";if(u.includes(t))return i+"/";if(c.includes(t))return i+"-"}return i},"")}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@brazilian-utils/format-cpf"),require("@brazilian-utils/format-cnpj")):"function"==typeof define&&define.amd?define(["exports","@brazilian-utils/format-cpf","@brazilian-utils/format-cnpj"],e):e(t.formatters={},null,null)}(this,function(t,e,f){e=e&&e.hasOwnProperty("default")?e.default:e,f=f&&f.hasOwnProperty("default")?f.default:f,t.formatCpf=e,t.formatCnpj=f}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@brazilian-utils/formatters", | ||
"version": "0.1.6", | ||
"version": "0.1.8", | ||
"description": "A collection of useful formatters", | ||
@@ -29,7 +29,7 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@brazilian-utils/format-cnpj": "^0.1.5", | ||
"@brazilian-utils/format-cpf": "^0.1.4" | ||
"@brazilian-utils/format-cnpj": "^0.1.7", | ||
"@brazilian-utils/format-cpf": "^0.1.6" | ||
}, | ||
"devDependencies": { | ||
"microbundle": "^0.4.4" | ||
"microbundle": "^0.5.1" | ||
}, | ||
@@ -36,0 +36,0 @@ "publishConfig": { |
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 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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
2551
7
3
2