✏️ Edit: index.js
Path:
/home/thiqat5/sb.thiqatech.com/node_modules/webpack-cli/node_modules/locate-path/index.js
Size: 539 B · Modified: 2018-06-18 00:54:56 · Perm: 0644 · Writable
← Back to directory
👁 View
⬇ Download
'use strict'; const path = require('path'); const pathExists = require('path-exists'); const pLocate = require('p-locate'); module.exports = (iterable, options) => { options = Object.assign({ cwd: process.cwd() }, options); return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options); }; module.exports.sync = (iterable, options) => { options = Object.assign({ cwd: process.cwd() }, options); for (const el of iterable) { if (pathExists.sync(path.resolve(options.cwd, el))) { return el; } } };
💾 Save
Cancel
Save as UTF-8, newlines normalized to LF