1.1.1 • Published 5 years ago

@skypager/clients-npm v1.1.1

Weekly downloads
604
License
MIT
Repository
-
Last release
5 years ago

NPM Repository Client

An axios client for working with the npm registry.

Currently supports authorized communications to:

  • Fetch info about a package in the npm repository

Usage

import runtime from '@skypager/web'
import * as NpmClient from '@skypager/clients-npm'

runtime.use(NpmClient)

const npm = runtime.client('npm', {
  npmToken: process.env.NPM_TOKEN
})

npm.fetchPackageInfo('@some/private-repo').then((packageInfo) => {
  const versions = Object.keys(packageInfo.versions)
})