mithril-materialized
Version:
A materialize library for mithril.
27 lines (26 loc) • 800 B
TypeScript
/**
* Create a unique ID
* @see https://stackoverflow.com/a/2117523/319711
*
* @returns id followed by 8 hexadecimal characters.
*/
export declare const uniqueId: () => string;
/**
* Create a GUID
* @see https://stackoverflow.com/a/2117523/319711
*
* @returns RFC4122 version 4 compliant GUID
*/
export declare const uuid4: () => string;
/** Check if a string or number is numeric. @see https://stackoverflow.com/a/9716488/319711 */
export declare const isNumeric: (n: string | number) => boolean;
/**
* Pad left, default width 2 with a '0'
*
* @see http://stackoverflow.com/a/10073788/319711
* @param {(string | number)} n
* @param {number} [width=2]
* @param {string} [z='0']
* @returns
*/
export declare const padLeft: (n: string | number, width?: number, z?: string) => string;