• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-Sep-2020-

node_modules/H20-Sep-2020-945678

CHANGELOG.mdH A D26-Oct-19851.3 KiB5222

LICENSEH A D26-Oct-1985717 1411

PULL_REQUEST_TEMPLATEH A D26-Oct-1985183 80

README.mdH A D26-Oct-19851.6 KiB4127

package.jsonH A D20-Sep-20202 KiB6665

README.md

1# libnpmconfig [![npm version](https://img.shields.io/npm/v/libnpmconfig.svg)](https://npm.im/libnpmconfig) [![license](https://img.shields.io/npm/l/libnpmconfig.svg)](https://npm.im/libnpmconfig) [![Travis](https://img.shields.io/travis/npm/libnpmconfig.svg)](https://travis-ci.org/npm/libnpmconfig) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmconfig?svg=true)](https://ci.appveyor.com/project/zkat/libnpmconfig) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmconfig/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmconfig?branch=latest)
2
3[`libnpmconfig`](https://github.com/npm/libnpmconfig) is a Node.js library for
4programmatically managing npm's configuration files and data.
5
6## Example
7
8```js
9const config = require('libnpmconfig')
10
11console.log('configured registry:', config.read({
12  registry: 'https://default.registry/'
13}))
14// => configured registry: https://registry.npmjs.org
15```
16
17## Install
18
19`$ npm install libnpmconfig`
20
21## Table of Contents
22
23* [Example](#example)
24* [Install](#install)
25* [API](#api)
26
27### API
28
29##### <a name="read"></a> `> read(cliOpts, builtinOpts)`
30
31Reads configurations from the filesystem and the env and returns a
32[`figgy-pudding`](https://npm.im/figgy-pudding) object with the configuration
33values.
34
35If `cliOpts` is provided, it will be merged with the returned config pudding,
36shadowing any read values. These are intended as CLI-provided options. Do your
37own `process.argv` parsing, though.
38
39If `builtinOpts.cwd` is provided, it will be used instead of `process.cwd()` as
40the starting point for config searching.
41