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 2.2.3 to 2.2.4

2

index.js

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

if (!parsedURL.hostname) return null
if (parsedURL.hostname !== 'github.com' && !opts.enterprise) return null
if (parsedURL.hostname !== 'github.com' && parsedURL.hostname !== 'www.github.com' && !opts.enterprise) return null

@@ -43,0 +43,0 @@ var parts = parsedURL.pathname.match(/^\/([\w-_]+)\/([\w-_\.]+)(\/tree\/[\w-_\.\/]+)?(\/blob\/[\w-_\.\/]+)?/)

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

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

@@ -113,2 +113,8 @@ /* globals before, describe, it */

it('supports URLs with www', function () {
var obj = gh('https://www.github.com/zeke/outlet')
assert.equal(obj.user, 'zeke')
assert.equal(obj.repo, 'outlet')
})
it('supports deep URLs', function () {

@@ -115,0 +121,0 @@ var obj = gh('https://github.com/zeke/ruby-rails-sample/blob/b1e1000fedb6ca448dd78702de4fc78dedfee48c/app.json')

Sorry, the diff of this file is too big to display

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