🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

github-repositories

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-repositories - npm Package Compare versions

Comparing version
2.0.0
to
2.1.0
+18
-3
cli.js

@@ -13,5 +13,7 @@ #!/usr/bin/env node

'Options',
' -f, --forks Only list forks',
' -r, --repos Only display repository names',
' -s, --sources Only list sources',
' -t, --token GitHub authentication token',
' -f, --forks Only list forks',
' -s, --sources Only list sources'
' -u, --urls Only display URLs'
], {

@@ -26,4 +28,7 @@ boolean: [

alias: {
f: 'forks',
r: 'repos',
s: 'sources',
t: 'token',
f: 'forks'
u: 'urls'
}

@@ -51,4 +56,14 @@ });

if (cli.flags.repos) {
console.log(repo.name);
return;
}
if (cli.flags.urls) {
console.log(repo.html_url);
return;
}
console.log(repo.name + ' ' + chalk.dim(repo.html_url));
});
});
+7
-11

@@ -5,6 +5,12 @@ 'use strict';

function getRepos(user, opts) {
module.exports = function (user, opts) {
opts = opts || {};
var page = 1;
var ret = [];
if (typeof user !== 'string') {
return Promise.reject(new TypeError('Expected a string'));
}
return (function loop() {

@@ -24,12 +30,2 @@ var url = 'users/' + user + '/repos?&per_page=100&page=' + page;

})();
}
module.exports = function (user, opts) {
opts = opts || {};
if (typeof user !== 'string') {
return Promise.reject(new TypeError('Expected a string'));
}
return getRepos(user, opts);
};
{
"name": "github-repositories",
"version": "2.0.0",
"version": "2.1.0",
"description": "Get all Github repos from a user",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -38,4 +38,6 @@ # github-repositories [![Build Status](https://travis-ci.org/kevva/github-repositories.svg?branch=master)](https://travis-ci.org/kevva/github-repositories)

#### options.token
#### options
##### token
Type: `string`

@@ -64,5 +66,7 @@

Options
-t, --token GitHub authentication token
-f, --forks Only list forks
-r, --repos Only display repository names
-s, --sources Only list sources
-t, --token GitHub authentication token
-u, --urls Only display URLs
```

@@ -69,0 +73,0 @@