# global-doc-ident

> JavaScript identifier and validator for the number of Brazilian documents such as CPF and CNPJ returned in object as formatted version.

Latest version **1.1.0** (published 2021-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install global-doc-ident
pnpm add global-doc-ident
yarn add global-doc-ident
bun add global-doc-ident
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-01-18 |
| First published | 2021-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alailson Barbosa Ribeiro |
| Maintainers | alailson |
| Keywords | CPF, CNPJ, DOCUMENT, ID, JavaScript, Node.js, Browser, MercadoPago, PagSeguro, PayPal, Identifier, Identificador, API |

## Links

- npm: https://www.npmjs.com/package/global-doc-ident
- Repository: https://github.com/alailsonribeiro/global-doc-ident
- Homepage: https://github.com/alailsonribeiro/global-doc-ident#readme
- Issues: https://github.com/alailsonribeiro/global-doc-ident/issues
- npm.io page: https://npm.io/package/global-doc-ident

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-01-18
- 1.0.9 — 2021-01-18
- 1.0.8 — 2021-01-18
- 1.0.7 — 2021-01-18
- 1.0.6 — 2021-01-18
- 1.0.5 — 2021-01-14
- 1.0.4 — 2021-01-14
- 1.0.3 — 2021-01-13
- 1.0.2 — 2021-01-13
- 1.0.1 — 2021-01-13
- 1.0.0 — 2021-01-13

## README

# global-doc-ident

JavaScript identifier and validator for the number of Brazilian documents such as CPF and CNPJ returned in object as formatted version.

Identificador JavaScript e validador da quantidade de documentos brasileiros como CPF e CNPJ devolvidos no objeto como versão formatada.

Identificador y validador de JavaScript para el número de documentos brasileños como CPF y CNPJ devueltos en el objeto como versión formateada.


## Default use for Brazil Docs (CPF and CNPJ)


# How to install:

Published in https://www.npmjs.com/package/global-doc-ident

```

$ npm i global-doc-ident

```

# How to use:
```
const DocIdent = require('global-doc-ident')

console.log(DocIdent('000.000.001-91')) //CPF Default Brazil
console.log(DocIdent('000.000.001-91', 'br')) //CPF informing code of countrie
console.log(DocIdent('00.000.001/0001-36')) //CNPJ Default Brazil
console.log(DocIdent('00.000.001/0001-36', 'br')) //CNPJ informing code of countrie

```
## Return default Brazil

```
{
  type: 'CPF',
  doc: '00000000191',
  msk: '000.000.001-91',
  valid: true,
  country: 'Brazil',
  module: 'Used for br'
}
{
  type: 'CPF',
  doc: '00000000191',
  msk: '000.000.001-91',
  valid: true,
  country: 'Brazil',
  module: 'Used for br'
}
{
  type: 'CNPJ',
  doc: '00000001000136',
  msk: '00.000.001/0001-36',
  valid: true,
  country: 'Brazil',
  module: 'Used for br'
}
{
  type: 'CNPJ',
  doc: '00000001000136',
  msk: '00.000.001/0001-36',
  valid: true,
  country: 'Brazil',
  module: 'Used for br'
}
```


## Return from npm test

```
$ npm test

> global-doc-ident@1.0.0 test
> node test.js

{
  cpf: {
    type: 'CPF',
    doc: '00000000191',
    msk: '000.000.001-91',
    valid: true,
    country: 'Brazil',
    module: 'Used for br'
  },
  cnpj: {
    type: 'CNPJ',
    doc: '00000001000136',
    msk: '00.000.001/0001-36',
    valid: true,
    country: 'Brazil',
    module: 'Used for br'
  }
}

```

## Join here -> Project at **GitHub** 

If you are interested in contributing with new checkups for other types of documents related to Brazil and/or other countries, contact us by clicking on **[New Issue]** at link https://github.com/alailsonribeiro/global-doc-ident/issues of **GitHub**, for know how to get involved in the project.

Se você tiver interesse em contribuir com novos checkups para outros tipos de documentos relacionados ao Brasil e/ou outros países, entre em contato conosco clicando em **[New Issue]** no link https://github.com/alailsonribeiro/global-doc-ident/issues of **GitHub**, para saber como se envolver no projeto.

Si está interesado en contribuir con nuevos chequeos para otro tipo de documentos relacionados con Brasil y / u otros países, contáctenos haciendo clic en **[New Issue]** en el enlace https://github.com/alailsonribeiro/global-doc-ident/issues de **GitHub** , para aprender a involucrarse en el proyecto.

Si vous souhaitez contribuer à de nouveaux contrôles pour d'autres types de documents liés au Brésil et / ou à d'autres pays, contactez-nous en cliquant sur **[New Issue]** sur le lien https://github.com/alailsonribeiro/global-doc-ident/issues de **GitHub** , pour apprendre à s'impliquer dans le projet.

Wenn Sie daran interessiert sind, neue Überprüfungen für andere Arten von Dokumenten in Bezug auf Brasilien und / oder andere Länder durchzuführen, kontaktieren Sie uns, indem Sie unter dem Link https://github.com/alailsonribeiro/global-doc-ident/issues von **GitHub** auf **[New Issue]** klicken , um zu lernen, wie man sich an dem Projekt beteiligt.

如果您有兴趣对巴西和/或其他国家/地区的其他类型的文档进行新的检查，请通过单击 **GitHub** 的链接 https://github.com/alailsonribeiro/global-doc-ident/issues 上的 **[New Issue]** 与我们联系，以了解如何参与该项目。

إذا كنت مهتمًا بالمساهمة في فحوصات جديدة لأنواع أخرى من المستندات المتعلقة بالبرازيل و / أو دول أخرى ، فاتصل بنا من خلال النقر على https://github.com/alailsonribeiro/global-doc-ident/issues على الرابط **[New Issue]** من **GitHub** ، للتعرف على كيفية المشاركة في المشروع.

ブラジルや他の国に関連する他の種類のドキュメントの新しい検査に貢献することに興味がある場合は、プロジェクトに参加する方法について、**GitHub**のリンク https://github.com/alailsonribeiro/global-doc-ident/issues で  **[New Issue]**  をクリックしてお問い合わせください。

About Creator: [Alailson Barbosa Ribeiro](https://www.alailson.com.br)
=============
![alt text](https://secure.gravatar.com/avatar/f4a6fbf1b704b29c4236d964f5f5280c "Alailson Barbosa Ribeiro")

---
_Source: https://npm.io/package/global-doc-ident · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
