Socket
Socket
Sign inDemoInstall

github-api-promise

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-api-promise - npm Package Compare versions

Comparing version 1.9.1 to 1.10.0

2

package.json
{
"name": "github-api-promise",
"version": "1.9.1",
"version": "1.10.0",
"description": "A node module for interfacing with the Github API using promises",

@@ -5,0 +5,0 @@ "main": "src/app.js",

@@ -0,1 +1,3 @@

const req = require('./request-helpers');
var githubApi = {};

@@ -28,2 +30,4 @@

githubApi.getRequestCount = () => { return req.requestCount; };
// Set to window object if there is a window

@@ -30,0 +34,0 @@ if(typeof window !== 'undefined') {

@@ -10,2 +10,4 @@ const _ = require('lodash');

module.exports = {
requestCount: 0,
logRequestSuccess: function(res, message) {

@@ -20,2 +22,3 @@ if (config.debug !== true) {

(message ? message : ''));
log.debug(`Requests remaining: ${res.headers['x-ratelimit-remaining']}/${res.headers['x-ratelimit-limit']}, reset at ${new Date(res.headers['x-ratelimit-reset']*1000)}`);
},

@@ -81,2 +84,4 @@

self.requestCount++;
// Set standard stuff and handle response

@@ -93,2 +98,4 @@ req

function(err) {
// TODO: handle rate limiting (github sends a 403, not a 429)
// https://developer.github.com/v3/#rate-limiting
log.error(err);

@@ -95,0 +102,0 @@ deferred.reject(err.message);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc