find-up-path

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

MIT 2 个版本
安装
npm install find-up-path
yarn add find-up-path
pnpm add find-up-path
bun add find-up-path
README

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

版本列表
1.0.1 2025-01-12
1.0.0 2024-03-04