@doodad-js/npc

0.10.0-alpha.0 • Public • Published

This is a little package to get the configuration of your package that you can override using "npm config set ...".

Normally, this information is only accessible when your script is invoked by "npm run".

NPM is not very friendly with this wonderful feature. There is no API, and no '--json' option to 'npm config list'.

Usage:
    const npc = require('@doodad-js/npc');
    const result = npc.list([package_name], [options]);

New since version 0.5.0:
    const result = npc.listSync([package_name], [options]);
    const result = npc.listAsync([package_name], [options]);
Where:
    "package_name" : (optional) Name of the package
    "options" : (optional) An object which provide options by key/value pairs.
    "result" : The result of the function.

Options:     "async" : ("npc.list" only) When 'true', the function will return a Promise. When 'false', the function will return the result. Default is 'false'.
    "Promise" : Provides the Promise constructor. Default is 'global.Promise'.
    "module" : Provides the Node.js module object used to resolve files. Default is the parent module of '@doodad-js/npc'.

Readme

Keywords

Package Sidebar

Install

npm i @doodad-js/npc

Weekly Downloads

2

Version

0.10.0-alpha.0

License

MIT

Unpacked Size

55.7 kB

Total Files

29

Last publish

Collaborators

  • doodadjs