# @vanioinformatika/npmrc-auth-token-retriever

> Retrieve auth token from .npmrc file base on provided registry

Latest version **0.0.5** (published 2019-03-04) · 0 weekly downloads

## Install

```sh
npm install @vanioinformatika/npmrc-auth-token-retriever
pnpm add @vanioinformatika/npmrc-auth-token-retriever
yarn add @vanioinformatika/npmrc-auth-token-retriever
bun add @vanioinformatika/npmrc-auth-token-retriever
```

Provides the command `retrieve-auth-token`.

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-03-04 |
| First published | 2019-03-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | vanioinformatika |

## Links

- npm: https://www.npmjs.com/package/@vanioinformatika/npmrc-auth-token-retriever
- npm.io page: https://npm.io/package/@vanioinformatika/npmrc-auth-token-retriever

## Dependencies (1)

- [cli](https://npm.io/package/cli.md) ^1.0.1

## Recent versions

- 0.0.5 (latest) — 2019-03-04
- 0.0.4 — 2019-03-04
- 0.0.3 — 2019-03-04
- 0.0.2 — 2019-03-04
- 0.0.1 — 2019-03-01

## README

Search auth token inside `.npmrc` file base on registry URL. 

## Installation

```
npm install @vanioinformatika/npmrc-auth-token-retriever --save
```

## Usage

**From CLI:**

```
npx retrieve-auth-token --registry private-registry.organization.com
```

**From node:**

```javascript
import {retrieveAuthToken} from '@vanioinformatika/npmrc-auth-token-retriever'

const token = retrieveAuthToken('private-registry.organization.com')

if (token) {
    // Do something with token
} else {
    // Token not found in .npmrc file
}
```

If registry is not set, then default npmjs registry will be used (`registry.npmjs.org`).

> **Note:** Typescript declaration files are included in package.

---
_Source: https://npm.io/package/@vanioinformatika/npmrc-auth-token-retriever · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
