Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

get-auth-token-from-npmrc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-auth-token-from-npmrc

Convenience module and CLI for extracting the auth token from your ~/.npmrc file

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

get-auth-token-from-npmrc

Convenience module and CLI for extracting the auth token from your ~/.npmrc file

Hey! If you know of a better way to do this, please let me know.

Programmatic Usage

Install it locally:

npm i get-auth-token-from-npmrc --save

Then in your JS file:

const token = require('get-auth-token-from-npmrc')()
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

If ~/.npmrc exists and you're logged in to npm, a token is returned.

Otherwise, null is returned.

CLI Usage

Install it globally (or locally depending on your use-case):

npm i -g get-auth-token-from-npmrc && get-auth-token-from-npmrc

The token is written to stdout.

Dependencies

None

Dev Dependencies

None

License

MIT

FAQs

Package last updated on 08 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts