nav tabs on admin dashboard
This commit is contained in:
15
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
15
node_modules/cosmiconfig/dist/getDirectory.js
generated
vendored
@@ -4,14 +4,7 @@
|
||||
const path = require('path');
|
||||
const isDirectory = require('is-directory');
|
||||
|
||||
module.exports = function getDirectory(
|
||||
filepath ,
|
||||
sync
|
||||
) {
|
||||
if (sync === true) {
|
||||
return isDirectory.sync(filepath) ? filepath : path.dirname(filepath);
|
||||
}
|
||||
|
||||
function getDirectory(filepath ) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return isDirectory(filepath, (err, filepathIsDirectory) => {
|
||||
if (err) {
|
||||
@@ -20,4 +13,10 @@ module.exports = function getDirectory(
|
||||
return resolve(filepathIsDirectory ? filepath : path.dirname(filepath));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getDirectory.sync = function getDirectorySync(filepath ) {
|
||||
return isDirectory.sync(filepath) ? filepath : path.dirname(filepath);
|
||||
};
|
||||
|
||||
module.exports = getDirectory;
|
||||
|
||||
Reference in New Issue
Block a user