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.6 to 3.0.0

4

index.js

@@ -13,2 +13,6 @@ 'use strict'

// Allow an object with nested `url` string
// (common practice in package.json files)
if (repoUrl.url) repoUrl = repoUrl.url
var shorthand = repoUrl.match(/^([\w-_]+)\/([\w-_\.]+)#?([\w-_\.]+)?$/)

@@ -15,0 +19,0 @@ var mediumhand = repoUrl.match(/^github:([\w-_]+)\/([\w-_\.]+)#?([\w-_\.]+)?$/)

2

package.json
{
"name": "github-url-to-object",
"version": "2.2.6",
"version": "3.0.0",
"description": "Extract user, repo, and other interesting properties from GitHub URLs",

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

@@ -100,2 +100,10 @@ /* globals before, describe, it */

describe('repository.url object', function () {
it('accepts an object with a `url` property; common in package.json files', function () {
var obj = gh({url: 'http://github.com/zeke/outlet.git', type: 'git'})
assert.equal(obj.user, 'zeke')
assert.equal(obj.repo, 'outlet')
})
})
describe('http', function () {

@@ -102,0 +110,0 @@ it('supports http URLs', function () {

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