Skip to content

Files

Latest commit

eaf97f0 · Jan 12, 2025

History

History
23 lines (14 loc) · 401 Bytes

readme.md

File metadata and controls

23 lines (14 loc) · 401 Bytes

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