JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 149
  • Score
    100M100P100Q68112F
  • License MIT

Read a package.json content

Package Exports

  • to-read-package

Readme


Read a package.json content

NPM Version NPM Version NPM package ( download / month ) Follow @mastercorg Github release actions


Getting Started

npm install to-read-package

Usage

readPackage(fileName?, options?): JSON | undefined

import readPackage from 'to-read-package'

const pkg = readPackage()
// { "name": "root", ... }

const pkg = readPackage('./fewjiogw/wiefoiwe')
// undefined

const pkg = readPackage(undefined, { cwd: path.resolve('./packages/a') })
// { "name": "a", ... }

Options

{
    cwd: process.cwd()
}

NPM Version