# find-up-json

> Find, read and parse the first matching file found walking the filesystem upwards.

Latest version **2.0.5** (published 2025-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-up-json
pnpm add find-up-json
yarn add find-up-json
bun add find-up-json
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2025-01-12 |
| First published | 2021-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | fabiospampinato |
| Keywords | find, up, json, read, parse |

## Links

- npm: https://www.npmjs.com/package/find-up-json
- Repository: https://github.com/fabiospampinato/find-up-json
- Homepage: https://github.com/fabiospampinato/find-up-json#readme
- Issues: https://github.com/fabiospampinato/find-up-json/issues
- npm.io page: https://npm.io/package/find-up-json

## Dependencies (1)

- [find-up-path](https://npm.io/package/find-up-path.md) ^1.0.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.5 (latest) — 2025-01-12
- 2.0.4 — 2024-03-12
- 2.0.3 — 2024-03-04
- 2.0.2 — 2023-02-20
- 2.0.1 — 2023-01-13
- 2.0.0 — 2022-04-07
- 1.0.1 — 2021-07-12
- 1.0.0 — 2021-05-12

## README

# Find Up JSON

Find, read and parse the first matching file found walking the filesystem upwards.

Compared to alternatives this library is _tiny_, it has no dependencies, and it can be bundled without problems.

## Install

```sh
npm install find-up-json
```

## Usage

```ts
import findUp from 'find-up-json';

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

const pkg = findUp ( 'package.json' );

// =>
// {
//   path: '/path/to/found/package.json',
//   buffer: BufferContentOfFile,
//   content: {
//     // Result of JSON-parsing the content of the file
//     "name": "something..."
//     // ...
//   }
// }
```

## License

MIT © Fabio Spampinato

---
_Source: https://npm.io/package/find-up-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
