🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

parse-github-repo-url

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-github-repo-url - npm Package Compare versions

Comparing version

to
1.4.0

8

index.js

@@ -5,3 +5,3 @@ var parse = require('url').parse

// user/repo#version
var m = /^([\w-]+)\/([\w-.]+)((?:#|@).+)?$/.exec(string)
var m = /^([\w-.]+)\/([\w-.]+)((?:#|@).+)?$/.exec(string)
if (m) return format(m)

@@ -23,3 +23,3 @@

// https://www.npmjs.org/doc/json.html#Git-URLs-as-Dependencies
var m = /^\/([\w-]+)\/([\w-.]+)$/.exec(path)
var m = /^\/([\w-.]+)\/([\w-.]+)$/.exec(path)
if (m) return m.slice(1, 3).concat((url.hash || '').slice(1))

@@ -29,3 +29,3 @@

// https://developer.github.com/v3/repos/contents/#get-archive-link
var m = /^\/repos\/([\w-]+)\/([\w-.]+)\/(?:tarball|zipball)(\/.+)?$/.exec(path)
var m = /^\/repos\/([\w-.]+)\/([\w-.]+)\/(?:tarball|zipball)(\/.+)?$/.exec(path)
if (m) return format(m)

@@ -35,3 +35,3 @@

// https://developer.github.com/v3/repos/contents/#response-4
var m = /^\/([\w-]+)\/([\w-.]+)\/(?:legacy\.(?:zip|tar\.gz))(\/.+)?$/.exec(path)
var m = /^\/([\w-.]+)\/([\w-.]+)\/(?:legacy\.(?:zip|tar\.gz))(\/.+)?$/.exec(path)
if (m) return format(m)

@@ -38,0 +38,0 @@

{
"name": "parse-github-repo-url",
"description": "Parse a GitHub URL for user/project@version",
"version": "1.3.0",
"version": "1.4.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",