{"_id":"@azify/cpf-cnpj","_rev":"4-dbfd2b5a0b271c36d7a55ad6af124c8b","name":"@azify/cpf-cnpj","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@azify/cpf-cnpj","version":"0.1.0","author":{"name":"Azify"},"license":"UNLICENSED","_id":"@azify/cpf-cnpj@0.1.0","maintainers":[{"name":"davi_costa","email":"davi.vieira@wisiex.com"},{"name":"digorc","email":"rodrigo123correia321@gmail.com"},{"name":"nayara.dias","email":"nayara.dias@capitual.com"},{"name":"hugoazify","email":"hugoferreira@brcfintechltda.com"},{"name":"mardoc","email":"edl_@live.com"},{"name":"pabloperdiz","email":"pablo.perdiz@wisiex.com"},{"name":"danielsaraldi","email":"danielsaraldi@gmail.com"},{"name":"andrerebonato","email":"andrev.rebonato@gmail.com"}],"homepage":"https://github.com/azifydev/azify-cpf-cnpj#readme","bugs":{"url":"https://github.com/azifydev/azify-cpf-cnpj/issues"},"dist":{"shasum":"5ca5d322b165438565bb0d312fc00d1ebfb4e091","tarball":"https://registry.npmjs.org/@azify/cpf-cnpj/-/cpf-cnpj-0.1.0.tgz","fileCount":6,"integrity":"sha512-7BjCTarFvBOfaKQRHMOCXFxt4JpAchMAyDMWNQ8sre5O5bamHErPKCkoIPALwB8U2P36iN3PQ/rvRrZH0QmrTw==","signatures":[{"sig":"MEQCIGpcGyz/WxF+2o+W7jsX+6heVOVX8V8FtNk8UWvIKRfIAiARTPw/onPc1DIevFz0wLVyTmAQr2XjnOt4jb3Y9UHh/w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19970},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"1f6920cc96ae85a90bf193b52b2392ad7691b208","scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"pabloperdiz","email":"pablo.perdiz@wisiex.com"},"repository":{"url":"git+https://github.com/azifydev/azify-cpf-cnpj.git","type":"git"},"_npmVersion":"11.14.1","description":"CPF/CNPJ validation, formatting and comparison helpers (including alphanumeric CNPJ).","directories":{},"_nodeVersion":"24.12.0","publishConfig":{"access":"restricted"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/cpf-cnpj_0.1.0_1782748363644_0.9178534547848489","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@azify/cpf-cnpj","version":"0.1.1","author":{"name":"Azify"},"license":"MIT","_id":"@azify/cpf-cnpj@0.1.1","maintainers":[{"name":"davi_costa","email":"davi.vieira@wisiex.com"},{"name":"digorc","email":"rodrigo123correia321@gmail.com"},{"name":"nayara.dias","email":"nayara.dias@capitual.com"},{"name":"hugoazify","email":"hugoferreira@brcfintechltda.com"},{"name":"mardoc","email":"edl_@live.com"},{"name":"pabloperdiz","email":"pablo.perdiz@wisiex.com"},{"name":"danielsaraldi","email":"danielsaraldi@gmail.com"},{"name":"andrerebonato","email":"andrev.rebonato@gmail.com"}],"homepage":"https://github.com/azifydev/azify-cpf-cnpj#readme","bugs":{"url":"https://github.com/azifydev/azify-cpf-cnpj/issues"},"dist":{"shasum":"c101aba2a04499cfef823252a7899080f5abd04c","tarball":"https://registry.npmjs.org/@azify/cpf-cnpj/-/cpf-cnpj-0.1.1.tgz","fileCount":7,"integrity":"sha512-GI5ldjr99SqZh3Yl6Q1XJFBgUY5T5r7qCNd8zPnuABxZ+LFiJgYvUk58vtYhFjSqJcmdEuVRt8c0/B03qzmSVA==","signatures":[{"sig":"MEQCIC40+HlErL3+o7P1ah/BTFzt7JM1vKYGjPojwAgNNCfEAiApxYlNS00BNLFMBC+Eal/HfKuxREaLQ+i5KYIb8zypow==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21021},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"bc5d8844dfde38edc1f3bac0d5e4afa64b57b5e9","scripts":{"test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"pabloperdiz","email":"pablo.perdiz@wisiex.com"},"repository":{"url":"git+https://github.com/azifydev/azify-cpf-cnpj.git","type":"git"},"_npmVersion":"10.9.4","description":"CPF/CNPJ validation, formatting and comparison helpers (including alphanumeric CNPJ).","directories":{},"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/cpf-cnpj_0.1.1_1782907780740_0.29069055867566473","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-29T15:52:43.385Z","modified":"2026-07-16T16:39:39.296Z","0.1.0":"2026-06-29T15:52:43.776Z","0.1.1":"2026-07-01T12:09:40.938Z"},"bugs":{"url":"https://github.com/azifydev/azify-cpf-cnpj/issues"},"author":{"name":"Azify"},"license":"MIT","homepage":"https://github.com/azifydev/azify-cpf-cnpj#readme","repository":{"url":"git+https://github.com/azifydev/azify-cpf-cnpj.git","type":"git"},"description":"CPF/CNPJ validation, formatting and comparison helpers (including alphanumeric CNPJ).","maintainers":[{"email":"davi.vieira@wisiex.com","name":"davi_costa"},{"email":"rodrigo123correia321@gmail.com","name":"digorc"},{"email":"nayara.dias@capitual.com","name":"nayara.dias"},{"email":"hugoferreira@brcfintechltda.com","name":"hugoazify"},{"email":"edl_@live.com","name":"mardoc"},{"email":"pablo.perdiz@wisiex.com","name":"pabloperdiz"},{"email":"neiltonline@gmail.com","name":"neiltonline"},{"email":"danielsaraldi@gmail.com","name":"danielsaraldi"},{"email":"andrev.rebonato@gmail.com","name":"andrerebonato"}],"readme":"# @azify/cpf-cnpj\n\nValidation, formatting, and comparison of CPF/CNPJ, including support for alphanumeric CNPJ (effective Jul/2026).\n\n## Installation\n\n```\nnpm install @azify/cpf-cnpj\n```\n\n## Usage\n\n```ts\nimport { cpf, cnpj, taxpayer } from '@azify/cpf-cnpj'\n\ncpf.isValid('529.982.247-25') // true\ncpf.isValid('111.111.111-11') // false (invalid check digit)\ncpf.format('52998224725')     // '529.982.247-25'\ncpf.format('123')             // null (doesn't have 11 digits)\ncpf.compare(a, b)             // true | false | null (null if a or b is invalid)\ncpf.clean('529.982.247-25')   // '52998224725'\n\ncnpj.isValid('11.444.777/0001-61') // true\ncnpj.isValid('AB123CD4501E66')     // true (alphanumeric CNPJ)\ncnpj.isValid('11.111.111/1111-11') // false (invalid check digit)\ncnpj.format('11444777000161')      // '11.444.777/0001-61'\ncnpj.format('AB123CD4501E66')      // 'AB.123.CD4/501E-66'\ncnpj.format('123')                 // null (doesn't have 14 positions)\ncnpj.compare(a, b)                 // true | false | null (null if a or b is invalid)\ncnpj.clean('11.444.777/0001-61')   // '11444777000161'\n\ntaxpayer.type('52998224725')   // 'cpf' | 'cnpj' | null (null if it's not a valid CPF or CNPJ)\ntaxpayer.isValid('invalid')    // false\ntaxpayer.format('invalid')     // null\ntaxpayer.compare(a, b)         // true | false | null (null if a or b is invalid)\ntaxpayer.clean(value)          // normalizes CPF or CNPJ (alphanumeric)\n```\n\n### About `null` returns\n\n- `format` returns `null` when the value doesn't have the expected length (CPF: 11 digits; CNPJ: 14 positions). It **does not** check the verification digit — a well-formed CPF/CNPJ with an invalid checksum is still formatted (e.g., `cpf.format('00000000000')` returns `'000.000.000-00'`). Use `isValid` when you need to guarantee the document is actually valid.\n- `compare` returns `null` (not `false`) when **either** of the two values is invalid — this lets you distinguish \"different documents\" from \"cannot compare\".\n- `taxpayer.type` returns `null` when the value is neither a valid CPF nor a valid CNPJ (it doesn't distinguish \"not a CPF\" from \"not a CNPJ\").\n","readmeFilename":"README.md"}