pkgstat
v1.2.4
Published
Search package stats & info on npm, rubygems, pypi
Downloads
13
Maintainers
Readme
pkgstat
Get metadata of package from node, python and ruby.
Install
$ npm install --save pkgstat
Usage
const pkgstat = require('pkgstat');
pkgstat("django", "python")
.then(resp => {
console.log(resp);
/*
{
name: 'Django',
author: 'Django Software Foundation',
description: 'A high-level Python Web framework....',
url: 'http://pypi.python.org/pypi/Django',
source: 'https://www.djangoproject.com/',
license: 'BSD',
version: '1.11rc1',
statusCode: 200
}
*/
});
pkgstat("somePkgWhichDoesNotExist","node")
.then(resp => {
console.log(resp);
//{statusCode: 404}
});
pkgstat("request","ruby")
.then(resp => {
console.log(resp);
/*
{
name: 'request',
author: 'Markus Schirp',
description: 'HTTP request porofication',
url: 'https://rubygems.org/gems/request',
source: null,
license: 'MIT',
version: '0.0.6',
statusCode: 200
}
*/
});