pkg-entry

1.0.0 • Public • Published

pkg-entry

NPM version Unix Build Status Windows Build Status Coveralls Status Dependency Status

expose jsnext:main or main properties from object, defaults to index.js

Install

npm install --save pkg-entry

Usage

import pkgEntry from 'pkg-entry';
 
const main = { main: './main.js' };
pkgEntry(main); // ./main.js
 
const jsnext = { 'jsnext:main': './jsnext.js', main: './jsnext.es5.js' };
pkgEntry(jsnext); // ./jsnext.js
 
const defaults = {};
pkgEntry(defaults); // index.js

API

pkgEntry(pkg)

pkg

Required
Type: Object

JSON from package.json.

License

MIT © Vladimir Starkov

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    3

Package Sidebar

Install

npm i pkg-entry

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • iamstarkov