2.1.4 • Published 12 months ago

req-package-json v2.1.4

Weekly downloads
65
License
ISC
Repository
github
Last release
12 months ago

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.