# libnpmconfig

> Standalone library for reading/writing/managing npm configurations

Latest version **1.2.1** (published 2018-11-13) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install libnpmconfig
pnpm add libnpmconfig
yarn add libnpmconfig
bun add libnpmconfig
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2018-11-13 |
| First published | 2018-11-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 38.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kat Marchán |
| Maintainers | zkat |

## Links

- npm: https://www.npmjs.com/package/libnpmconfig
- Repository: https://github.com/npm/libnpmconfig
- Homepage: https://npmjs.com/package/libnpmconfig
- Issues: https://github.com/npm/libnpmconfig/issues
- npm.io page: https://npm.io/package/libnpmconfig

## Dependencies (3)

- [ini](https://npm.io/package/ini.md) ^1.3.5
- [find-up](https://npm.io/package/find-up.md) ^3.0.0
- [figgy-pudding](https://npm.io/package/figgy-pudding.md) ^3.5.1

## Recent versions

- 1.2.1 (latest) — 2018-11-13
- 1.2.0 — 2018-11-13
- 1.1.1 — 2018-11-04
- 1.1.0 — 2018-11-04
- 1.0.0 — 2018-11-04

## README

# 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)

[`libnpmconfig`](https://github.com/npm/libnpmconfig) is a Node.js library for
programmatically managing npm's configuration files and data.

## Example

```js
const config = require('libnpmconfig')

console.log('configured registry:', config.read({
  registry: 'https://default.registry/'
}))
// => configured registry: https://registry.npmjs.org
```

## Install

`$ npm install libnpmconfig`

## Table of Contents

* [Example](#example)
* [Install](#install)
* [API](#api)

### API

##### <a name="read"></a> `> read(cliOpts, builtinOpts)`

Reads configurations from the filesystem and the env and returns a
[`figgy-pudding`](https://npm.im/figgy-pudding) object with the configuration
values.

If `cliOpts` is provided, it will be merged with the returned config pudding,
shadowing any read values. These are intended as CLI-provided options. Do your
own `process.argv` parsing, though.

If `builtinOpts.cwd` is provided, it will be used instead of `process.cwd()` as
the starting point for config searching.

---
_Source: https://npm.io/package/libnpmconfig · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
