npm-package-config v0.7.0
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('npm-package-config'); 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 'npm-package-config'.