2 const path = require('path');
3 const pathExists = require('path-exists');
4 const pLocate = require('p-locate');
6 module.exports = (iterable, options) => {
7 options = Object.assign({
11 return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options);
14 module.exports.sync = (iterable, options) => {
15 options = Object.assign({
19 for (const el of iterable) {
20 if (pathExists.sync(path.resolve(options.cwd, el))) {