find-up-json
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

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

npm install --save find-up-json

Usage

import findUp from 'find-up-json';

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

/find-up-json/

    Package Sidebar

    Install

    npm i find-up-json

    Weekly Downloads

    19,813

    Version

    2.0.4

    License

    none

    Unpacked Size

    6.12 kB

    Total Files

    16

    Last publish

    Collaborators

    • fabiospampinato