Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "hkid", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Generate and Validate HKID", | ||
"main": "lib/index.js", | ||
"main": "dist/index.js", | ||
"repository": "https://github.com/tsekityam/hkid.git", | ||
@@ -11,2 +11,3 @@ "author": "Tse Kit Yam <tsekityam@users.noreply.github.com>", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@tsconfig/recommended": "^1.0.1", | ||
"@types/jest": "^26.0.24", | ||
@@ -28,3 +29,3 @@ "@types/node": "^16.4.13", | ||
"scripts": { | ||
"build": "tsc", | ||
"prepack": "tsc", | ||
"lint": "eslint --ignore-path '.gitignore' '**/*.ts'", | ||
@@ -35,2 +36,5 @@ "format": "prettier --ignore-unknown --ignore-path '.gitignore' --write '**/*'", | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
@@ -37,0 +41,0 @@ "hkid" |
@@ -19,9 +19,10 @@ # hkid | ||
// generate valid HKID randomly | ||
console.log(hkid.random()); | ||
console.log(hkid.random()); // H3497811 | ||
// validate HKID | ||
console.log(hkid.validate("h349781(0)")); // false | ||
console.log(hkid.validate("H3497811")); // true | ||
console.log(hkid.validate("h3497811")); // true | ||
console.log(hkid.validate("H349781(1)")); // true | ||
console.log(hkid.validate("h349781(1)")); // true, case doesn't matter | ||
console.log(hkid.validate("H3497811")); // true, brackets is optional | ||
console.log(hkid.validate("h349781(1)")); // true | ||
console.log(hkid.validate("H3497810")); // false | ||
``` | ||
@@ -28,0 +29,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
34
5827
16
5
89
1