pkgstat

1.2.4 • Public • Published

pkgstat

Get metadata of package from node, python and ruby.

Build Status MITlicensed

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 
        }
        */
    });

Package Sidebar

Install

npm i pkgstat

Weekly Downloads

8

Version

1.2.4

License

MIT

Unpacked Size

8.36 kB

Total Files

7

Last publish

Collaborators

  • prdpx7