PHP 8.2.30
Preview: index.js Size: 539 B
/usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/index.js

'use strict';
const path = require('path');
const pathExists = require('path-exists');
const pLocate = require('p-locate');

module.exports = (iterable, options) => {
	options = Object.assign({
		cwd: process.cwd()
	}, options);

	return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options);
};

module.exports.sync = (iterable, options) => {
	options = Object.assign({
		cwd: process.cwd()
	}, options);

	for (const el of iterable) {
		if (pathExists.sync(path.resolve(options.cwd, el))) {
			return el;
		}
	}
};

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
539 B lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.08 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.78 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download
1.49 KB lrw-r--r-- 2021-03-10 14:36:38
Edit Download

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