@playbooks/utils
Version:
A collection of utilities used for Playbooks.
20 lines (19 loc) • 1.1 kB
TypeScript
export declare const env: string;
export declare const sleep: (ms: any) => Promise<unknown>;
export declare const getSeconds: () => number;
export declare const getRandomInt: (max?: number) => number;
export declare const getUUID: (v?: number) => any;
export declare const getPlural: (value: any) => any;
export declare const getSingular: (value: any) => any;
export declare const formatUUID: (url: any, index?: number) => any;
export declare const mapChildren: (data: any, key: any) => any[];
export declare const buildArray: (count?: number) => number[];
export declare const chunkArray: (array: any, chunkSize: any) => any[];
export declare const shuffleArray: (array: any) => any;
export declare const computeBytes: (data: any, unit?: string) => any;
export declare const isArray: (data: any) => data is any[];
export declare const isDate: (data: any) => boolean;
export declare const isFunction: (data: any) => boolean;
export declare const isObject: (data: any) => boolean;
export declare const isString: (data: any) => data is string;
export declare const isEmpty: (data: any) => boolean;