Socket
Socket
Sign inDemoInstall

@hutson/parse-repository-url

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hutson/parse-repository-url - npm Package Compare versions

Comparing version 3.0.2 to 4.0.0

license.md

46

package.json

@@ -13,3 +13,3 @@ {

"engines": {
"node": ">=6.9.0"
"node": ">=8.9.0"
},

@@ -26,3 +26,36 @@ "files": [

"main": "src/index.js",
"mocha": {
"checkLeaks": true,
"fullTrace": true,
"inlineDiffs": true,
"recursive": true,
"reporter": "progress"
},
"name": "@hutson/parse-repository-url",
"nyc": {
"all": true,
"exclude": [
"src/cli.js",
"src/**/*.spec.js",
"src/**/*.mock.js"
],
"include": [
"src/**/*.js"
],
"reporter": [
"lcov",
"text"
]
},
"renovate": {
"extends": [
"config:base",
":maintainLockFilesWeekly",
":rebaseStalePrs",
":automergeDigest",
":gitSignOff",
":automergeMinor",
":preserveSemverRanges"
]
},
"repository": {

@@ -33,15 +66,12 @@ "type": "git",

"scripts": {
"test": "semistandard 'src/**/*.js' && nyc mocha --opts mocha.opts src/**/*.spec.js"
"test": "semistandard 'src/**/*.js' && nyc mocha src/**/*.spec.js"
},
"version": "3.0.2",
"version": "4.0.0",
"devDependencies": {
"@hutson/conventional-changelog-config": "^2.0.0",
"@hutson/nyc-config": "^2.0.0",
"chai": "^4.2.0",
"codecov": "^3.1.0",
"debug": "^4.1.0",
"mocha": "^5.2.0",
"npm-publish-git-tag": "^3.0.0",
"mocha": "^6.0.0",
"nyc": "^13.1.0",
"semantic-release-gitlab": "^7.0.10",
"semantic-release-gitlab": "^8.0.1",
"semistandard": "^13.0.1"

@@ -48,0 +78,0 @@ },

8

src/index.js

@@ -37,11 +37,11 @@ 'use strict';

function getType (parsedURL) {
if (typeof parsedURL.host !== `string`) {
function getType ({ host }) {
if (typeof host !== `string`) {
return null;
}
if (parsedURL.host.indexOf(`github`) !== -1) {
if (host.indexOf(`github`) !== -1) {
return 'github';
}
if (parsedURL.host.indexOf(`gitlab`) !== -1) {
if (host.indexOf(`gitlab`) !== -1) {
return 'gitlab';

@@ -48,0 +48,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