credentials-by-uri
Gets credentials for URI from npm configs
Last updated 3 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install credentials-by-uri 
SYNC missed versions from official npm registry.

credentials-by-uri

npm version Status

Gets credentials for URI from npm configs

Install

pnpm add credentials-by-uri

Usage

const credentialsByUri = require('credentials-by-uri')

const config = {
  registry: 'https://registry.npmjs.com',
  '//registry.com/:_authToken': 'f23jj93f32dsaf==',
  '//registry.com/:always-auth': 'false'
}

console.log(
  credentialsByUri(config, 'https://registry.com')
)
> { authHeaderValue: 'Bearer f23jj93f32dsaf==', alwaysAuth: false }

Related

License

MIT

Current Tags

  • 2.1.0                                ...           latest (3 years ago)
  • 2.0.0                                ...           next (5 years ago)

4 Versions

  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           5 years ago
  • 2.0.0-0                                ...           5 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (4)

© 2010 - cnpmjs.org x YWFE | Home | YWFE