UNPKG

generate-alphabetic-name

Version:

Take an arbitrary string or integer and generate a short alphabetic code. It works in the browser and node.js and is designed to be as small as possible, and extremely fast.

8 lines (7 loc) 228 B
/** * Generate a short alphabetic code (base-52) for an integer * * @param code An integer * @returns A short string using only /[a-zA-Z]+/ */ export default function generateAlphabeticNameFromNumber(code: number): string;