global-dni
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Global DNI

collection of libraries to format and validate multiple DNI types

DNI Available:

* Chile (CL)
* Perú (PE)
* España (ES)
* Paraguay (PY)

Installation

npm install --save global-dni

Api

format(dni)
validate(dni)
clean(dni)

Example

 import dni from 'global-dni'
 
 dni.ES.validate('181303859') // false
 dni.CL.validate('181303859') // true
 
 dni.PE.clean('1*2*3456*78*')   // '12345678'

Package Sidebar

Install

npm i global-dni

Weekly Downloads

48

Version

1.1.3

License

MIT

Unpacked Size

5.31 kB

Total Files

11

Last publish

Collaborators

  • ariverak