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

ssh-config

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-config - npm Package Compare versions

Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3

1

History.md

@@ -7,2 +7,3 @@ 2.0.0 / 2019-06-??

* Fix: quoted values can contain double quotes once they are escaped with backslash
* Fix: escape + when converting patterns to regexp

@@ -9,0 +10,0 @@

6

index.js

@@ -13,3 +13,3 @@ 'use strict'

function match(line, opts) {
function compare(line, opts) {
return opts.hasOwnProperty(line.param) && opts[line.param] === line.value

@@ -68,3 +68,3 @@ }

return super.find(line => match(line, opts))
return super.find(line => compare(line, opts))
}

@@ -82,3 +82,3 @@

? super.findIndex(opts)
: super.findIndex(line => match(line, opts))
: super.findIndex(line => compare(line, opts))

@@ -85,0 +85,0 @@ if (index >= 0) return this.splice(index, 1)

{
"name": "ssh-config",
"description": "SSH config parser and stringifier",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"author": "Chen Yangjian (https://www.cyj.me)",

@@ -6,0 +6,0 @@ "repository": {

'use strict'
function match(pattern, str) {
pattern = pattern.replace(/\./g, '\\.')
pattern = pattern
.replace(/\./g, '\\.')
.replace(/\+/g, '\\+')
.replace(/\*/g, '.*')

@@ -19,3 +21,3 @@ .replace(/\?/g, '.?')

function glob(patternList, str) {
const patterns = Array.isArray(patternList) ? patternList : patternList.split(/[,\s]+/)
const patterns = Array.isArray(patternList) ? patternList : patternList.split(/,/)

@@ -30,2 +32,3 @@ // > If a negated entry is matched, then the Host entry is ignored, regardless of whether any other patterns on the line match.

} else if (match(pattern, str)) {
// wait until all of the pattern match results because there might be a negated pattern
result = true

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