1.2.1 • Published 10 months ago

@cedric0303/id-generator v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@cedric0303/id-generator

Installation

Install globally to use sgid or hkid:

npm install --global @cedric0303/id-generator

yarn global add @cedric0303/id-generator

bun add --global @cedric0303/id-generator

Install locally to use in projects:

npm install @cedric0303/id-generator

yarn add @cedric0303/id-generator
****
bun add @cedric0303/id-generator

Global Usage

> sgid
A5758052

> hkid
S8541816E

// output automatically copied to clipboard

See sgid --help or hkid --help for more details

Module/Programmatic Usage

@cedric0303/id-generator can be imported as a module:

import {
  randomHKID,
  randomSGID,
  isValidHKID,
  isValidSGID
} from "@cedric0303/id-generator";

const hkid = await randomHKID();
const sgid = await randomSGID();

console.log(hkid, isValidHKID(hkid));
console.log(sgid, isValidSGID(sgid));

Acknowledgements

This project incorporates code from the following projects:

1.2.0

10 months ago

1.2.1

10 months ago

1.1.2

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago