Socket
Socket
Sign inDemoInstall

gitio2

Package Overview
Dependencies
47
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

4

index.js

@@ -5,3 +5,3 @@ var request = require('request');

request({
url: 'http://git.io/create',
url: 'https://git.io/create',
method: 'post',

@@ -17,3 +17,3 @@ form: {

if (res.statusCode < 300 && res.statusCode >= 200) {
callback(null, 'http://git.io/' + body);
callback(null, 'https://git.io/' + body);
} else {

@@ -20,0 +20,0 @@ callback(new Error('Git.io ' + res.headers.status));

{
"name": "gitio2",
"version": "2.0.0",
"author": "Felix Saparelli <me@passcod.name>",
"contributors": {"Tane Piper": "piper.tane@gmail.com"},
"version": "3.0.0",
"author": "Félix Saparelli <me@passcod.name>",
"contributors": {
"Tane Piper": "piper.tane@gmail.com",
"Nathan Warner": "nathan@frcv.net"
},
"description": "Wrapper around the git.io URL shortener",

@@ -19,4 +22,4 @@ "main": "./index",

"dependencies": {
"request": "2.22.x"
"request": "^2.22.0"
}
}

@@ -18,3 +18,3 @@ Git.io 2

```javascript
var gitio = require('gitio');
var gitio = require('gitio2');

@@ -21,0 +21,0 @@ gitio('https://github.com/passcod/node-gitio', console.log);

var gitio = require('./index');
gitio('https://github.com/tanepiper/node-gitio', console.log);
var urls = [
["https://github.com/passcod/node-gitio", "https://git.io/AuAj"],
["https://passcod.name", "[Error: Git.io 500 Internal Server Error]"]
];
console.log("Input, Expected output");
urls.forEach(function(url) {
var source = url[0];
var result = url[1];
console.log(source + ', ' + result);
});
console.log("-----");
console.log("(Results may not be in order)");
urls.forEach(function(source) {
gitio(source[0], function(err, url) {
if (err) {
console.log("Got error: ", err);
} else {
console.log("Got URL: ", url);
}
});
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc