object-scan
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -39,10 +39,8 @@ const compiler = require("./util/compiler"); | ||
if (evalBreakFn(haystack, search, pathIn, parents, ctx)) { | ||
return result; | ||
if (!evalBreakFn(haystack, search, pathIn, parents, ctx)) { | ||
for (let i = 0; i < haystack.length; i += 1) { | ||
result.push(...find(haystack[i], search, pathIn.concat(i), parents, ctx)); | ||
} | ||
} | ||
for (let i = 0; i < haystack.length; i += 1) { | ||
result.push(...find(haystack[i], search, pathIn.concat(i), parents, ctx)); | ||
} | ||
return result; | ||
@@ -69,19 +67,17 @@ } | ||
if (evalBreakFn(haystack, search, pathIn, parents, ctx)) { | ||
return result; | ||
} | ||
if (haystack instanceof Object) { | ||
const isArray = Array.isArray(haystack); | ||
const parentsOut = [haystack].concat(parents); | ||
Object.entries(haystack).forEach(([key, value]) => { | ||
const pathOut = pathIn.concat(isArray ? parseInt(key, 10) : key); | ||
Object.entries(search).forEach(([entry, subSearch]) => { | ||
if (entry === "**") { | ||
[subSearch, search].forEach(s => result.push(...find(value, s, pathOut, parentsOut, ctx))); | ||
} else if (matches(entry, key, isArray, subSearch)) { | ||
result.push(...find(value, subSearch, pathOut, parentsOut, ctx)); | ||
} | ||
if (!evalBreakFn(haystack, search, pathIn, parents, ctx)) { | ||
if (haystack instanceof Object) { | ||
const isArray = Array.isArray(haystack); | ||
const parentsOut = [haystack].concat(parents); | ||
Object.entries(haystack).forEach(([key, value]) => { | ||
const pathOut = pathIn.concat(isArray ? parseInt(key, 10) : key); | ||
Object.entries(search).forEach(([entry, subSearch]) => { | ||
if (entry === "**") { | ||
[subSearch, search].forEach(s => result.push(...find(value, s, pathOut, parentsOut, ctx))); | ||
} else if (matches(entry, key, isArray, subSearch)) { | ||
result.push(...find(value, subSearch, pathOut, parentsOut, ctx)); | ||
} | ||
}); | ||
}); | ||
}); | ||
} | ||
} | ||
@@ -113,2 +109,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ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Bqb2luZWQsXG4gICAgZXNjYXBlUGF0aHMsXG4gICAgdXNlQXJyYXlTZWxlY3RvclxuICB9KSldO1xufTtcbiJdfQ== |
{ | ||
"name": "object-scan", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Find Keys using Wildcard matching and optional value function.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48733
315