包详细信息

find-up-path

fabiospampinato86.9kMIT1.0.1

Find the path of the first file matching a given name, walking the filesystem upwards.

find, up, file, folder

自述文件

Find Up Path

Find the path of the first file matching a given name, walking the filesystem upwards.

Install

npm install find-up-path

Usage

import findUpPath from 'find-up-path';

// Let's find the path of the nearest `package.json` file

const packagePath = findUpPath ( 'package.json' ); // => '/path/to/package.json' | undefined

License

MIT © Fabio Spampinato