Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github-url-from-username-repo

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-url-from-username-repo - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

index.js

@@ -14,3 +14,3 @@ module.exports = getUrl

// GH usernames cannot start with . or -
if (/^[^@%\/\s\.-][^@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) {
if (/^[^@%\/\s\.-][^:@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) {
if (forBrowser)

@@ -17,0 +17,0 @@ r = r.replace("#", "/tree/")

{
"name": "github-url-from-username-repo",
"version": "1.0.1",
"version": "1.0.2",
"description": "Create urls from username/repo",

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

@@ -20,2 +20,7 @@ var assert = require("assert")

it("returns null for something that's already a URI", function () {
var url = getUrl("file:../relative")
assert.deepEqual(null, url)
})
it("works with .", function () {

@@ -43,3 +48,3 @@ var url = getUrl("component/.download.er.js.")

})
it("can handle branches with slashes", function () {

@@ -46,0 +51,0 @@ var url = getUrl(

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