singapore-nric
Advanced tools
Comparing version 1.2.1 to 2.0.0
@@ -9,5 +9,5 @@ { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true, | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"jest.jestCommandLine": "node --experimental-vm-modules node_modules/jest/bin/jest.js", | ||
} |
{ | ||
"name": "singapore-nric", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "Generate & Validate Singapore NRIC (National Registration Identity Card) Numbers", | ||
@@ -9,6 +9,14 @@ "author": { | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Goh Sheen An", | ||
"url": "https://github.com/sheen4n" | ||
} | ||
], | ||
"license": "MIT", | ||
"type": "module", | ||
"main": "src/nric.js", | ||
"main": "dist/nric.js", | ||
"types": "dist/nric.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js" | ||
@@ -49,8 +57,12 @@ }, | ||
], | ||
"transform": {} | ||
"transform": {}, | ||
"preset": "ts-jest" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.12", | ||
"eslint": "^8.9.0", | ||
"jest": "^27.5.1" | ||
"jest": "^29.1.2", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.4.2" | ||
} | ||
} |
@@ -8,3 +8,3 @@ # singapore-nric | ||
Looking to do it manually instead? Use these tools on my website: [generate](https://samliew.com/nric-generator) or [validate](https://samliew.com/singapore-nric-validator). | ||
You can also use these pages on my website to [generate](https://samliew.com/nric-generator) or [validate](https://samliew.com/singapore-nric-validator) manually. | ||
@@ -16,3 +16,3 @@ <br> | ||
``` | ||
npm -i singapore-nric | ||
npm install singapore-nric | ||
``` | ||
@@ -30,10 +30,10 @@ | ||
| Property | Type | Description | | ||
| ----------------- | --------- | --------------------------------- | | ||
| `value` | string | entire value of NRIC | | ||
| `firstchar` | string | first character | | ||
| `identifier` | string | last four alphanumeric characters | | ||
| `checksum` | string | checksum (last character) | | ||
| `isCorrectFormat` | boolean | format is valid | | ||
| `isValid` | boolean | checksum is valid | | ||
| Property | Type | Description | | ||
| ----------------- | ------- | --------------------------------- | | ||
| `value` | string | entire value of NRIC | | ||
| `firstchar` | string | first character | | ||
| `identifier` | string | last four alphanumeric characters | | ||
| `checksum` | string | checksum (last character) | | ||
| `isCorrectFormat` | boolean | format is valid | | ||
| `isValid` | boolean | checksum is valid | | ||
@@ -54,2 +54,3 @@ ### Examples | ||
### `Validate( nric )` | ||
Validate a single NRIC, or an array of NRIC strings | ||
@@ -66,2 +67,3 @@ | ||
### `Generate( firstchar? )` | ||
Returns a random NRIC with valid checksum | ||
@@ -77,4 +79,4 @@ | ||
### `GenerateMany( amount )` | ||
### `GenerateMany( amount )` | ||
Generate an array of NRICs with valid checksum | ||
@@ -81,0 +83,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31618
21
579
89
5
1