UNPKG

list-filepaths

Version:

Asynchronously return an array containing the paths of all files in a directory and its subdirectories

16 lines (11 loc) 278 B
'use strict'; const shouldReject = (str, rejectOption) => { if (rejectOption instanceof RegExp) { return rejectOption.test(str); } if (rejectOption instanceof Function) { return Boolean(rejectOption(str)); } return false; }; module.exports = shouldReject;