Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gswalden/getver
Get latest version number of an npm package from GitHub
https://github.com/gswalden/getver
Last synced: 25 days ago
JSON representation
Get latest version number of an npm package from GitHub
- Host: GitHub
- URL: https://github.com/gswalden/getver
- Owner: gswalden
- License: isc
- Created: 2016-02-05T23:13:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-25T21:44:32.000Z (almost 9 years ago)
- Last Synced: 2024-11-29T23:08:33.862Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/getver.svg)](https://badge.fury.io/js/getver)
[![Build status](https://travis-ci.org/gswalden/getver.svg?branch=master)](https://travis-ci.org/gswalden/getver)
[![Dependencies](https://david-dm.org/gswalden/getver.svg)](https://david-dm.org/gswalden/getver)### Install
```sh
npm install --save getver
```### Use
```js
var getver = require('getver');
getver({
username: 'gswalden', // GitHub username of package owner
repo: 'getver' // GitHub repo name of package
}, function(err, version, pkg) {
console.log(err); // null or Error
console.log(version); // string containing version, i.e. "1.0.0"
console.log(pkg); // object containing entire package.json
});
```### Notes
This is a thin wrapper around [github-get](https://www.npmjs.com/package/github-get), and the options object will pass-through to that package. Therefore, you can include a `token` property in order to access private repos.