req-package-json
v2.1.4
Published
Load and parse nearest package.json.
Downloads
57
Maintainers
Readme
Require package.json
Load and parse the nearest package.json, relative to the callers directory.
Installation
$ npm i req-package-json
Usage
import reqPackageJson from "req-package-json"
console.log(reqPackageJson()) // {name: "whatever", version: "1.0.0"}
Advanced
import { reqPackageJson } from "req-package-json"
reqPackageJson() // relative to current dir (where the function is called)
reqPackageJson("dir/where/to/start/searching") // relative to given dir
Contribute
All feedback is appreciated. Create a pull request or write an issue.