Preview: index.js
Size: 297 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/pkg-dir/index.js
'use strict';
const path = require('path');
const findUp = require('find-up');
module.exports = cwd => findUp('package.json', {cwd}).then(fp => fp ? path.dirname(fp) : null);
module.exports.sync = cwd => {
const fp = findUp.sync('package.json', {cwd});
return fp ? path.dirname(fp) : null;
};
Directory Contents
Dirs: 1 × Files: 4