@iimm/shared
Version:
shared utils on browser and react env
10 lines (8 loc) • 418 B
TypeScript
import { customAlphabet } from 'nanoid';
/** Generate secure URL-friendly unique ID(由数字和字母构成).
By default, the ID will have 21 symbols to have a collision probability similar to UUID v4
* @param size — Size of the ID. The default size is 21.
* @return — A random string.
*/
declare const nanoid: (size?: number) => string;
export { customAlphabet as customNanoidAlphabet, nanoid, };