validator-tax-id 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# Tax ID Validator
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/validator-tax-id)
|
|
4
|
+
[](https://www.npmjs.com/package/validator-tax-id)
|
|
5
|
+
[](https://github.com/AngelBlanco97/tax-id-validator/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/AngelBlanco97/tax-id-validator/actions)
|
|
7
|
+
|
|
3
8
|
A lightweight, zero-dependency, and universal TypeScript library to validate Tax IDs (Identification Numbers)
|
|
4
9
|
|
|
5
|
-
It uses precise mathematical algorithms to verify the integrity of the document number and follow guides of the country
|
|
10
|
+
It uses precise mathematical algorithms to verify the integrity of the document number and follow guides of the country governments
|
|
6
11
|
|
|
7
12
|
## Features
|
|
8
13
|
|
|
@@ -14,11 +19,11 @@ It uses precise mathematical algorithms to verify the integrity of the document
|
|
|
14
19
|
## Installation
|
|
15
20
|
|
|
16
21
|
```bash
|
|
17
|
-
npm install tax-id
|
|
22
|
+
npm install validator-tax-id
|
|
18
23
|
# or
|
|
19
|
-
yarn add tax-id
|
|
24
|
+
yarn add validator-tax-id
|
|
20
25
|
# or
|
|
21
|
-
pnpm add tax-id
|
|
26
|
+
pnpm add validator-tax-id
|
|
22
27
|
```
|
|
23
28
|
|
|
24
29
|
## Usage
|
|
@@ -28,7 +33,7 @@ pnpm add tax-id-validator
|
|
|
28
33
|
The main function `validateIdentification` takes two arguments: the **country code** (ISO 3166-1 alpha-2) and the **value** to validate.
|
|
29
34
|
|
|
30
35
|
```typescript
|
|
31
|
-
import { validateIdentification } from "tax-id
|
|
36
|
+
import { validateIdentification } from "validator-tax-id";
|
|
32
37
|
|
|
33
38
|
// 🇪🇸 Spain (ES)
|
|
34
39
|
// Validates DNI (8 digits + letter)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "validator-tax-id",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -19,11 +19,16 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsup",
|
|
21
21
|
"dev": "tsup --watch",
|
|
22
|
-
"test": "vitest"
|
|
22
|
+
"test": "vitest",
|
|
23
|
+
"docs:dev": "vitepress dev docs",
|
|
24
|
+
"docs:build": "vitepress build docs",
|
|
25
|
+
"docs:preview": "vitepress preview docs"
|
|
23
26
|
},
|
|
24
27
|
"devDependencies": {
|
|
25
28
|
"tsup": "^8.0.0",
|
|
26
29
|
"typescript": "^5.0.0",
|
|
27
|
-
"
|
|
30
|
+
"vitepress": "^1.6.4",
|
|
31
|
+
"vitest": "^4.0.17",
|
|
32
|
+
"vue": "^3.5.26"
|
|
28
33
|
}
|
|
29
34
|
}
|