4.1.2 • Published 4 years ago

fetch-from-npm-registry v4.1.2

Weekly downloads
15
License
MIT
Repository
github
Last release
4 years ago

fetch-from-npm-registry

A fetch lib specifically for using with the npm registry

npm version

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)))
  //> {
  //    "name": "is-positive",
  //    "version": "1.0.0",
  //    "devDependencies": {
  //      "ava": "^0.0.4"
  //    },
  //    "_hasShrinkwrap": false,
  //    "directories": {},
  //    "dist": {
  //      "shasum": "88009856b64a2f1eb7d8bb0179418424ae0452cb",
  //      "tarball": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz"
  //    },
  //    "engines": {
  //      "node": ">=0.10.0"
  //    }
  //  }

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

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

2.0.0-0

5 years ago

1.0.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago