# netrc2

> Parse netrc files with a simple API

Latest version **0.1.4** (published 2015-08-04) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2015-08-04 |
| First published | 2014-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vadim Demedes |
| Maintainers | vdemedes |
| Keywords | netrc |

## Links

- npm: https://www.npmjs.com/package/netrc2
- Repository: https://github.com/vdemedes/netrc2
- Homepage: https://github.com/vdemedes/netrc2#readme
- Issues: https://github.com/vdemedes/netrc2/issues
- npm.io page: https://npm.io/package/netrc2

## Dependencies (1)

- [user-home](https://npm.io/package/user-home.md) ^2.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2015-08-04
- 0.1.3 — 2015-07-28
- 0.1.2 — 2015-07-05
- 0.1.1 — 2015-05-20
- 0.1.0 — 2014-11-23

## README

# netrc2 [![Circle CI](https://circleci.com/gh/vdemedes/netrc2.svg?style=svg)](https://circleci.com/gh/vdemedes/netrc2)

Simple utility to read and save [netrc](http://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html) files.

*Why netrc2?* Because "netrc" is already taken on npm.


### Installation

```
npm install netrc2 --save
```


### Usage

**Note**: netrc2 is a synchronous module.

```javascript
var netrc = require('netrc2');

var machines = netrc(); // read .netrc in $HOME

var auth = machines['example.com'];
var login = auth[0];
var password = auth[1];

machines['example.com'] = ['new login', 'new password'];
machines.save();
```


### Tests

```
make test
```


### License

netrc2 is released under the MIT License.

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