Socket
Socket
Sign inDemoInstall

github-url-to-object

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-url-to-object - npm Package Compare versions

Comparing version 1.5.3 to 1.6.0

4

index.js

@@ -34,3 +34,3 @@ 'use strict'

var parsedURL = url.parse(repo_url)
if (!parsedURL.hostname) return null

@@ -58,5 +58,7 @@ if (parsedURL.hostname !== 'github.com') return null

obj.travis_url = util.format('https://travis-ci.org/%s/%s', obj.user, obj.repo)
obj.zip_url = util.format('https://github.com/%s/%s/archive/master.zip', obj.user, obj.repo)
} else {
obj.https_url = util.format('https://github.com/%s/%s/tree/%s', obj.user, obj.repo, obj.branch)
obj.travis_url = util.format('https://travis-ci.org/%s/%s?branch=%s', obj.user, obj.repo, obj.branch)
obj.zip_url = util.format('https://github.com/%s/%s/archive/%s.zip', obj.user, obj.repo, obj.branch)
}

@@ -63,0 +65,0 @@

{
"name": "github-url-to-object",
"version": "1.5.3",
"version": "1.6.0",
"description": "Extract user, repo, and other interesting properties from GitHub URLs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -52,2 +52,3 @@ # github-url-to-object [![Build Status](https://travis-ci.org/zeke/github-url-to-object.png?branch=master)](https://travis-ci.org/zeke/github-url-to-object)

api_url: 'https://api.github.com/repos/monkey/business'
zip_url: 'https://github.com/monkey/business/archive/master.zip'
}

@@ -68,2 +69,3 @@ ```

api_url: 'https://api.github.com/repos/monkey/business'
zip_url: 'https://github.com/monkey/business/archive/nachos.zip'
}

@@ -70,0 +72,0 @@ ```

@@ -176,2 +176,6 @@ /* globals before, describe, it */

it('zip_url', function () {
assert.equal(obj.zip_url, 'https://github.com/zeke/ord/archive/master.zip')
})
})

@@ -202,2 +206,6 @@

it('applies to zip_url', function () {
assert.equal(obj.zip_url, 'https://github.com/zeke/ord/archive/experiment.zip')
})
})

@@ -204,0 +212,0 @@

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