Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nutboltu/about-package
A lightweight package that retrieve the information of a npm package
https://github.com/nutboltu/about-package
about-package npm npm-package-info package-details package-info
Last synced: about 1 month ago
JSON representation
A lightweight package that retrieve the information of a npm package
- Host: GitHub
- URL: https://github.com/nutboltu/about-package
- Owner: nutboltu
- License: mit
- Created: 2018-01-26T12:33:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T20:32:05.000Z (almost 2 years ago)
- Last Synced: 2024-10-02T13:17:22.353Z (about 1 month ago)
- Topics: about-package, npm, npm-package-info, package-details, package-info
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# about-package
[![dependencies Status](https://david-dm.org/nutboltu/about-package/status.svg)](https://david-dm.org/nutboltu/about-package) [![Build Status](https://travis-ci.org/nutboltu/about-package.svg?branch=master)](https://travis-ci.org/nutboltu/about-package)A lightweight package that retrieve the information of a npm package
## Installation
```bash
npm install --save about-package
```## Usage
```javascript
var aboutPackage = require('about-package');aboutPackage('express', function(err, info) {
if (err) {
console.error(err);
}
else console.log(info);
});
```
## Output
| Attribute | Type | Description |
|-------------------|------------|-------------|
| `name` | string | Package name |
| `version` | string | Latest version of that npm package |
| `description` | string | Description of that npm package
| `license` | string | Type of license of that npm package
| `downloads` | object | This attribute contains number of download counts on `last day`, `last week` and `last month`
| `github` | object | This attribute contains github information of that npm package. e.g: `stars`, `forks`, `open issues`, `watchers`, `last updated` and `created`
## Sample Output
```javascript
{
name: 'express',
version: '4.16.2',
description: 'Fast, unopinionated, minimalist web framework',
license: 'MIT',
downloads: {
lastDay: 726729,
lastWeek: 4254539,
lastMonth: 4254539
},
github: {
stars: 36286,
forks: 6541,
openIssues: 166,
watchers: 36286,
lastUpdated: '2018-01-26T13:00:10Z',
created: '2009-06-26T18:56:01Z'
}
}
```## License
MIT Licensed. Copyright (c) Farhad Yasir 2018.