0.1.0 • Published 7 years ago
sort-github-repositories v0.1.0
sort-github-repositories
Install
$ npm install sort-github-repositories
Usage
const sortRepos = require('sort-github-repositories');
sortGithubRepos('maxvcode', 'created_at').then(data => {
console.log(data);
// [ { id: 95045428,name: 'javascript-guessing-game',full_name: 'maxvcode/javascript-guessing-game',owner: { lo...}, ...]
});
// descending sort
sortGithubRepos('maxvcode', '-created_at').then(data => {
// use data
});
API
sortRepos(username, sortField)
username
Type: string
GitHub username.
options
sortField
Type: string
Field to sort by. Optional fields can be seen HERE in the Response object.
Constructed with the help of
License
MIT © Max Voronov
0.1.0
7 years ago