package-config
Simply read the configuration of any package. Optionally also reading a package.json.
Config files read:
- directory/package.json (if a directory is given),
- directory/npmrc (if a directory is given),
- `globalConfig` (Default: /etc/npmrc),
- `userConfig` (Default: ~/.npmrc)
Doesn't read npm's built-in config file.
Usage:
const readConfig = ; const config = await ; console; // { key: value, ... }