fetch-from-npm-registry
A fetch lib specifically for using with the npm registry

Installation
<pnpm|npm|yarn> add fetch-from-npm-registry
Usage
'use strict'
const createFetcher = require('fetch-from-npm-registry').default
const fetchFromNpmRegistry = createFetcher({userAgent: 'fetch-from-npm-registry'})
fetchFromNpmRegistry('https://registry.npmjs.org/is-positive')
.then(res => res.json())
.then(metadata => console.log(JSON.stringify(metadata.versions['1.0.0'], null, 2)))
API
fetchFromNpmRegistry(url, opts)
Arguments
- url - String - url to request
- opts.fullMetadata - Boolean - If true, don't attempt to fetch filtered ("corgi") registry metadata. (default: false)
License
MIT © Zoltan Kochan