PHP 8.2.30
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

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-28 00:26:18
Edit Download
297 B lrw-r--r-- 2026-02-28 00:26:42
Edit Download
1.08 KB lrw-r--r-- 2026-02-28 00:26:52
Edit Download
767 B lrw-r--r-- 2026-02-28 00:26:32
Edit Download
1.22 KB lrw-r--r-- 2026-02-28 00:27:02
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).