find-up-json
Find, read and parse the first matching file found walking the filesystem upwards.
Last updated 3 years ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install find-up-json 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.2                                ...           latest (2 years ago)

5 Versions

  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (5)

Copyright 2013 - present © cnpmjs.org | Home |