Socket
Socket
Sign inDemoInstall

is-ssh

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.2 to 1.3.3

6

example/index.js

@@ -76,2 +76,8 @@ "use strict";

console.log(isSsh("http://host.xz:8000/path/to/repo.git/"));
// false
console.log(isSsh("https://host.xz:8000/path/to/repo.git/"));
// false
// Local (Filesystem) Transport Protocol

@@ -78,0 +84,0 @@ console.log(isSsh("/path/to/repo.git/"));

3

lib/index.js

@@ -32,5 +32,6 @@ "use strict";

// TODO This probably could be improved :)
return input.indexOf("@") < input.indexOf(":");
var urlPortPattern = new RegExp('\.([a-zA-Z\\d]+):(\\d+)\/');
return !input.match(urlPortPattern) && input.indexOf("@") < input.indexOf(":");
}
module.exports = isSsh;
{
"name": "is-ssh",
"version": "1.3.2",
"version": "1.3.3",
"description": "Check if an input value is a ssh url or not.",

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

@@ -150,2 +150,8 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->

console.log(isSsh("http://host.xz:8000/path/to/repo.git/"))
// false
console.log(isSsh("https://host.xz:8000/path/to/repo.git/"))
// false
// Local (Filesystem) Transport Protocol

@@ -262,4 +268,4 @@ console.log(isSsh("/path/to/repo.git/"));

- `nodegit-clone`
- `bb-parse-url`
- `bb-git-up`
- `bb-parse-url`
- `normalize-ssh`

@@ -273,2 +279,20 @@ - `xl-git-up`

- `react-native-plugpag-wrapper`
- `react-native-pulsator-native`
- `react-native-kakao-maps`
- `@geeky-apo/react-native-advanced-clipboard`
- `native-apple-login`
- `native-google-login`
- `@hemith/react-native-tnk`
- `react-native-contact-list`
- `@corelmax/react-native-my2c2p-sdk`
- `clonit`
- `react-native-responsive-size`
- `react-native-test-module-hhh`
- `react-native-is7`
- `@buganto/client`
- `@datalogic/react-native-datalogic-module`
- `birken-react-native-community-image-editor`
- `@lakutata/core`
- `react-native-flyy`
- `native-kakao-login`

@@ -275,0 +299,0 @@

@@ -16,4 +16,3 @@ "use strict";

// HTTP/S Transport Protocol
, ["http://host.xz/path/to/repo.git/", false], ["https://host.xz/path/to/repo.git/", false]
, ["http://host.xz/path/to/repo.git/", false], ["https://host.xz/path/to/repo.git/", false], ["http://host.xz:8000/path/to/repo.git/", false], ["https://host.xz:8000/path/to/repo.git/", false]
// Local (Filesystem) Transport Protocol

@@ -20,0 +19,0 @@ , ["/path/to/repo.git/", false], ["path/to/repo.git/", false], ["~/path/to/repo.git", false], ["file:///path/to/repo.git/", false], ["file://~/path/to/repo.git/", false]];

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc