모든 프로젝트

HSC

Human Short Code (HSC)

출시됨

의미 없는 ID에 지치셨나요? HSC는 복사하기 어려운 ID를 사람이 읽기 쉬운 형식으로 안전하게 변환합니다

예시

$ npm i human-short-code
import { 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