PHP 7.4.33
Preview: index.js Size: 297 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/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
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:30
Edit Download
297 B lrw-r--r-- 2025-03-28 11:04:32
Edit Download
1.08 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
767 B lrw-r--r-- 2025-03-28 11:04:32
Edit Download
1.22 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).