UNPKG

esc-get-matching-files-array-async

Version:

async function that returns an array of files matching regex pattern, recursively inside specified directory.

13 lines (11 loc) 481 B
/** * Asynchronously and recursively gets an array of files matching the provided regex in the given directory. * @param dirPath Absolute or relative directory path to search. * @param filenameRegex Optional. Regex to match filenames. Defaults to /\.m?js$/. * @returns Promise that resolves to an array of matching file paths. */ export declare function getMatchingFilesAP( dirPath: string, filenameRegex?: RegExp ): Promise<string[]>; export default getMatchingFilesAP;