@freik/node-utils
Version:
My personal set of utilities for NodeJS
20 lines (19 loc) • 575 B
TypeScript
type FilterFn = (name: string) => boolean;
export type GroupEntry = RegExp | FilterFn;
export type Groups = {
[keys: string | symbol]: GroupEntry;
};
export interface NormalOptions {
filter?: 'staged' | 'all';
cwd?: string;
}
export interface GroupedOptions extends NormalOptions {
groups: Groups;
}
export type GroupedResult = {
groups: Map<string, string[]>;
remaining: string[];
};
export declare function files(options: GroupedOptions): Promise<GroupedResult>;
export declare function files(options?: NormalOptions): Promise<string[]>;
export {};