1.2.1 • Published 8 months ago

@cedric0303/id-generator v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

8 months ago

1.2.1

8 months ago

1.1.2

9 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago