UNPKG

@naturalcycles/js-lib

Version:

Standard library for universal (browser + Node.js) javascript

8 lines (7 loc) 376 B
/// <reference lib="dom" preserve="true" /> /** * Function that takes a length (defaults to 21) and generates a random string id of that length. */ export type NanoidFunction = (length?: number) => string; export declare function nanoidBrowser(length?: number): string; export declare function nanoidBrowserCustomAlphabet(alphabet: string, length?: number): NanoidFunction;