New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

string-matching

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-matching - npm Package Compare versions

Comparing version 1.11.15 to 1.11.16

2

package.json
{
"name": "string-matching",
"version": "1.11.15",
"version": "1.11.16",
"description": "Checks strings against patterns and collects matched substrings",

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

@@ -5,2 +5,4 @@ const MatchingError = require ('./matching_error')

var _set_key = (step, val, dict, throw_matching_error, path) => {
if(step.name == '_') return true
var v

@@ -7,0 +9,0 @@ if(!step.type || step.type == 'str') {

@@ -29,2 +29,16 @@ const sm = require('../src/index');

test('underscore', () => {
var matcher = sm.gen_matcher('!{first},!{_},!{second},!{_},!{third}')
var dict = {}
var res = matcher('abc,000,def,111,ghi', dict)
expect(res).toEqual(true)
expect(dict).toEqual({
first: 'abc',
second: 'def',
third: 'ghi',
})
})
test('invalid string match expression', () => {

@@ -31,0 +45,0 @@ expect( () => { sm.gen_matcher(`!{`) } ).toThrow(/Invalid string match expression/)

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