src/index.js
function tryFile(directories, filename) {
	return firstResult(directories, dir => {
		const filepath = path.resolve(dir, filename);
		return fs.existsSync(filepath) ? filepath : undefined;
	});
}
function tryFile(directories, filename) {
	return firstResult(directories, dir => {
		const filepath = path.resolve(dir, filename);
		return fs.existsSync(filepath) ? filepath : undefined;
	});
}
function tryFile ( directories , filename ) { return firstResult ( directories , dir => { const filepath = path . resolve ( dir , filename ) ; return fs . existsSync ( filepath ) ? filepath : undefined ; } ) ; }
Try to load a file from a list of folders.

@param {string[]} directories
@param {string} filename
@return {string|undefined} Absolute path or undefined
Try to load a file from a list of folders .