morbo-cli
Version:
… All tech debt is vermin in the eyes of Morbo!
21 lines (20 loc) • 721 B
TypeScript
/**
* Determines whether or not to let the file through. by ensuring that the
* file name does not match one of the excluded directories, and ensuring it
* matches one of the file filters.
*
* It will also ensure that even if a binary file matches the filter patterns,
* it will not let it through as searching binary file contents for string
* matches will never make sense.
*
*/
declare type FileFiltererOptions = {
ignoredDirectories: string[];
filesToScan: string[];
};
declare type FileInformation = {
path: string;
fullPath: string;
};
export default function fileFilterer({ ignoredDirectories, filesToScan }: FileFiltererOptions): (fileInformation: FileInformation) => boolean;
export {};