Sha256: c66737d7879de92efda1ac3f281061da4679575a9a15573f432bfa08ab71e4db
Contents?: true
Size: 452 Bytes
Versions: 29
Compression:
Stored size: 452 Bytes
Contents
'use strict'; const path = require('path'); const findUp = require('find-up'); const pkgDir = async cwd => { const filePath = await findUp('package.json', {cwd}); return filePath && path.dirname(filePath); }; module.exports = pkgDir; // TODO: Remove this for the next major release module.exports.default = pkgDir; module.exports.sync = cwd => { const filePath = findUp.sync('package.json', {cwd}); return filePath && path.dirname(filePath); };
Version data entries
29 entries across 22 versions & 7 rubygems