1.1.7 • Published 4 years ago
spain-id v1.1.7
spain-id
What is this?
A very small library to validate spanish id documents (NIF, CIF, NIE).
From version 1.1.0 there is TypeScript support.
Installation
npm i spain-id
Or with yarn
yarn add spain-id
Usage
// import just what you need
import { validateSpanishId, spainIdType, validDNI, validNIE, validCIF } from 'spain-id'
validateSpanishId('39740191D') // Validates the 3 types of document
spainIdType('39740191D') // 'dni'
validDNI('14741806W') // true
validNIE('X8095495R') // true
validCIF('P4622000J') // true
Build and publish
Run npm publish
.
Credits
Note: Based on these algorithms
CIF validation has been fixed, added TypeScript support, and code style changed.
1.1.1
4 years ago
1.0.16
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago