1.0.0 • Published 2 years ago

npms-info v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

npms-info

an API Wrapper for NPMs

Documents

Work in progress...

Examples

  • Fetch Package Information
// ESM
import npmsinfo from "npms-info"

// CommonJS
const npmsinfo = require("npms-info")

npmsinfo('PACKAGE-NAME')
.then(result => {
    console.log(result);
})
.catch(console.error)
  • Fetch Package with a specific version
// ESM
import npmsinfo from "npms-info"

// CommonJS
const npmsinfo = require("npms-info")

npmsinfo('PACKAGE-NAME', 'PACKGE-VERSION')
.then(result => {
    console.log(result);
})
.catch(console.error)
  • Get other packages of the maintainer
// ESM
import npmsinfo from "npms-info"

// CommonJS
const npmsinfo = require("npms-info")

npmsinfo('PACKAGE-NAME')
.then(result => {
    result.maintainers[0].fetchPackages()
    .then(userPackages => {
        // Enjoy the data.
    })
})
.catch(console.error)