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

@brazilian-utils/formatters

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brazilian-utils/formatters - npm Package Compare versions

Comparing version 0.1.6 to 0.1.8

2

dist/index.js

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

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