Socket
Socket
Sign inDemoInstall

ssh-config

Package Overview
Dependencies
Maintainers
1
Versions
41
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 4.0.1 to 4.0.2

6

History.md

@@ -0,1 +1,7 @@

4.0.2 / 2020-02-09
==================
* fix: 'compute' fails when hosts contain regex chars #34 @roblourens
4.0.1 / 2020-02-01

@@ -2,0 +8,0 @@ ==================

2

package.json
{
"name": "ssh-config",
"description": "SSH config parser and stringifier",
"version": "4.0.1",
"version": "4.0.2",
"author": "Chen Yangjian (https://www.cyj.me)",

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

'use strict'
function escapeChars(str, chars) {
for (let char of chars) {
str = str.replace(new RegExp('\\' + char, 'g'), '\\' + char)
}
return str
}
function match(pattern, str) {
pattern = escapeChars(pattern, '\\()[]{}.+^$|');
pattern = pattern
.replace(/\./g, '\\.')
.replace(/\+/g, '\\+')
.replace(/\*/g, '.*')

@@ -8,0 +15,0 @@ .replace(/\?/g, '.?')

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