Socket
Book a DemoInstallSign in
Socket

npm-data

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-data

Fetch NPM package metadata

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

npm-data

Fetch NPM package metadata

GitHub | NPM

Install

npm i npm-data

Basic usage

const packageData = require('npm-data')

// in async context...

const phinLatestMetadata = await packageData('phin', 'latest')

console.log(phinLatestMetadata.version)

Fetch all versions

const phinAllMetadata = await packageData('phin')

console.log(phinAllMetadata.created)

// "2014-05-21T03:41:11.311Z"

Fetch specific version

const phinAllMetadata = await packageData('phin', '3.2.4')

console.log(phinAllMetadata.main)

// "lib/phin.min.js"

Keywords

npm

FAQs

Package last updated on 04 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts