New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hkid

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hkid - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

dist/index.d.ts

10

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc