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