@cpany/utils
Version:
CPany utils package
13 lines (8 loc) • 583 B
text/typescript
declare function uniq<T>(array: readonly T[]): T[];
declare function filterMap<T, U>(array: readonly T[], fn: (arg: T) => U | undefined): U[];
declare function listJsonFiles<T>(dir: string): AsyncGenerator<T>;
declare function listFiles(dir: string, skipList?: Set<string>): AsyncGenerator<string>;
declare function slash(path: string): string;
declare function isUndef<T>(object: T | undefined | null): object is undefined | null;
declare function isDef<T>(object: T | undefined | null): object is T;
export { filterMap, isDef, isUndef, listFiles, listJsonFiles, slash, uniq };