🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

balanced-match

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balanced-match - npm Package Compare versions

Comparing version

to
0.4.2

2

index.js

@@ -33,3 +33,3 @@ module.exports = balanced;

while (i < str.length && i >= 0 && ! result) {
while (i >= 0 && !result) {
if (i == ai) {

@@ -36,0 +36,0 @@ begs.push(i);

{
"name": "balanced-match",
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"version": "0.4.1",
"version": "0.4.2",
"repository": {

@@ -16,3 +16,3 @@ "type": "git",

"devDependencies": {
"tape": "~4.5.0"
"tape": "^4.6.0"
},

@@ -19,0 +19,0 @@ "keywords": [

@@ -50,3 +50,3 @@ # balanced-match

If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.

@@ -60,3 +60,3 @@ ### var r = balanced.range(a, b, str)

If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]`.
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.

@@ -63,0 +63,0 @@ ## Installation