nav tabs on admin dashboard
This commit is contained in:
16
node_modules/locate-path/index.js
generated
vendored
16
node_modules/locate-path/index.js
generated
vendored
@@ -3,21 +3,21 @@ const path = require('path');
|
||||
const pathExists = require('path-exists');
|
||||
const pLocate = require('p-locate');
|
||||
|
||||
module.exports = (iterable, opts) => {
|
||||
opts = Object.assign({
|
||||
module.exports = (iterable, options) => {
|
||||
options = Object.assign({
|
||||
cwd: process.cwd()
|
||||
}, opts);
|
||||
}, options);
|
||||
|
||||
return pLocate(iterable, el => pathExists(path.resolve(opts.cwd, el)), opts);
|
||||
return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options);
|
||||
};
|
||||
|
||||
module.exports.sync = (iterable, opts) => {
|
||||
opts = Object.assign({
|
||||
module.exports.sync = (iterable, options) => {
|
||||
options = Object.assign({
|
||||
cwd: process.cwd()
|
||||
}, opts);
|
||||
}, options);
|
||||
|
||||
for (const el of iterable) {
|
||||
if (pathExists.sync(path.resolve(opts.cwd, el))) {
|
||||
if (pathExists.sync(path.resolve(options.cwd, el))) {
|
||||
return el;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user