Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghrepos

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghrepos - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

43

ghrepos.js

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

const jsonist = require('jsonist')
, qs = require('querystring')
, xtend = require('xtend')
, ghutils = require('ghutils')
const ghutils = require('ghutils')
function makeOptions (auth, options) {
return xtend({
headers : { 'User-Agent' : 'Magic Node.js application that does magic things' }
, auth : auth ? auth.user + ':' + auth.token : null
}, options)
}
function handler (callback) {
return function responseHandler (err, data) {
if (err)
return callback(err)
if (data.error || data.message)
return callback(new Error('Error from GitHub: ' + (data.error || data.message)))
callback(null, data)
}
}
function ghget (auth, url, options, callback) {
options = makeOptions(auth, options)
jsonist.get(url, options, handler(callback))
}
function ghpost (auth, url, data, options, callback) {
options = makeOptions(auth, options)
jsonist.post(url, data, options, handler(callback))
}
module.exports.list = function list (auth, org, options, callback) {

@@ -86,3 +47,3 @@ if (typeof org == 'function') { // list for this user

ghget(auth, url, options, callback)
ghutils.ghget(auth, url, options, callback)
}

6

package.json
{
"name": "ghrepos",
"version": "1.0.5",
"version": "1.1.0",
"description": "Interact with the GitHub repos API",

@@ -22,5 +22,3 @@ "main": "ghrepos.js",

"dependencies": {
"ghutils": "~1.2.1",
"jsonist": "~1.0.2",
"xtend": "~4.0.0"
"ghutils": "~1.2.1"
},

@@ -27,0 +25,0 @@ "devDependencies": {

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