HSC
Human Short Code (HSC)
Nailabas na
- Bersyon
- 1.0.3
- Lisensya
- MIT
- Stack
- TypeScriptPython
Pagod na sa mga walang-kahulugang ID? Ligtas na kino-convert ng HSC ang mahirap kopyahing ID sa human-readable na format
Halimbawa
$ npm i human-short-codeimport { hsc } from "human-short-code";
const myNumber = 123456789;
// Encode number to short code
const shortCode = hsc.encode(myNumber);
console.log(shortCode); // Example output: "QIUN-ESAD"
// Decode short code back to number
const originalNumber = hsc.decode(shortCode);
console.log(originalNumber); // 123456789
// Verify if a code is valid
const isValid = hsc.verify(shortCode);
console.log(isValid); // true