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.0 to 1.0.1

lib/index.d.ts

2

package.json
{
"name": "hkid",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generate and Validate HKID",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,1 +7,24 @@ # hkid

[![codecov](https://codecov.io/gh/tsekityam/hkid/branch/main/graph/badge.svg?token=34ZuXbF3md)](https://codecov.io/gh/tsekityam/hkid)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftsekityam%2Fhkid.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftsekityam%2Fhkid?ref=badge_shield)
## Installation
`yarn add hkid`
## Usage
```ts
import * as hkid from "hkid";
// generate valid HKID randomly
console.log(hkid.random());
// validate HKID
console.log(hkid.validate("h349781(0)")); // false
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
```
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftsekityam%2Fhkid.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftsekityam%2Fhkid?ref=badge_large)
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