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

2.1.4 • Public • Published

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.

Dependencies (0)

    Dev Dependencies (15)

    Package Sidebar

    Install

    npm i req-package-json

    Weekly Downloads

    15

    Version

    2.1.4

    License

    ISC

    Unpacked Size

    10.2 kB

    Total Files

    17

    Last publish

    Collaborators

    • zzrv