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

object-scan

Package Overview
Dependencies
Maintainers
1
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-scan - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

22

lib/index.js

@@ -27,9 +27,9 @@ const uniq = require("lodash.uniq");

const find = (haystack, checks, pathIn, ctx) => {
const find = (haystack, checks, pathIn, ctx, parents) => {
const result = [];
if (checks.some(check => check.length === 0)) {
if (ctx.filterFn === undefined || ctx.filterFn(formatPath(pathIn, ctx), haystack) !== false) {
if (ctx.filterFn === undefined || ctx.filterFn(formatPath(pathIn, ctx), haystack, parents) !== false) {
if (ctx.callbackFn !== undefined) {
ctx.callbackFn(formatPath(pathIn, ctx), haystack);
ctx.callbackFn(formatPath(pathIn, ctx), haystack, parents);
}

@@ -41,3 +41,3 @@

if (ctx.breakFn === undefined || ctx.breakFn(formatPath(pathIn, ctx), haystack) !== true) {
if (ctx.breakFn === undefined || ctx.breakFn(formatPath(pathIn, ctx), haystack, parents) !== true) {
if (haystack instanceof Object) {

@@ -49,7 +49,7 @@ if (Array.isArray(haystack)) {

if (ctx.useArraySelector === false) {
result.push(...find(haystack[i], [check], pathOut, ctx));
result.push(...find(haystack[i], [check], pathOut, ctx, parents));
} else if (check[0] === "**") {
result.push(...find(haystack[i], [check, check.slice(1)], pathOut, ctx));
result.push(...find(haystack[i], [check, check.slice(1)], pathOut, ctx, parents.concat([haystack])));
} else if (matches(check[0], `[${i}]`, true, ctx)) {
result.push(...find(haystack[i], [check.slice(1)], pathOut, ctx));
result.push(...find(haystack[i], [check.slice(1)], pathOut, ctx, parents.concat([haystack])));
}

@@ -64,5 +64,5 @@ });

if (check[0] === "**") {
result.push(...find(value, [check, check.slice(1)], pathOut, ctx));
result.push(...find(value, [check, check.slice(1)], pathOut, ctx, parents.concat([haystack])));
} else if (matches(check[0], escapedKey, false, ctx)) {
result.push(...find(value, [check.slice(1)], pathOut, ctx));
result.push(...find(value, [check.slice(1)], pathOut, ctx, parents.concat([haystack])));
}

@@ -96,4 +96,4 @@ });

useArraySelector
}));
}, []));
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJ1bmlxIiwicmVxdWlyZSIsInBhcnNlciIsImVzY2FwZSIsImlucHV0IiwiU3RyaW5nIiwicmVwbGFjZSIsImNvbXBhcmUiLCJ3aWxkY2FyZCIsImFyciIsImN0eCIsIm1hdGNoIiwicmVnZXhDYWNoZSIsInVuZGVmaW5lZCIsIlJlZ0V4cCIsInNwbGl0IiwibWFwIiwicCIsImpvaW4iLCJtYXRjaGVzIiwiQXJyYXkiLCJpc0FycmF5Iiwic29tZSIsIndjIiwiZm9ybWF0UGF0aCIsImpvaW5lZCIsInJlZHVjZSIsImMiLCJpc051bWJlciIsImVzY2FwZVBhdGhzIiwiZmluZCIsImhheXN0YWNrIiwiY2hlY2tzIiwicGF0aEluIiwicmVzdWx0IiwiY2hlY2siLCJsZW5ndGgiLCJmaWx0ZXJGbiIsImNhbGxiYWNrRm4iLCJwdXNoIiwiYnJlYWtGbiIsIk9iamVjdCIsImkiLCJwYXRoT3V0IiwiY29uY2F0IiwiZmlsdGVyIiwiZm9yRWFjaCIsInVzZUFycmF5U2VsZWN0b3IiLCJzbGljZSIsImVudHJpZXMiLCJrZXkiLCJ2YWx1ZSIsImVzY2FwZWRLZXkiLCJtb2R1bGUiLCJleHBvcnRzIiwibmVlZGxlcyIsInNlYXJjaCJdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTUEsT0FBT0MsUUFBUSxhQUFSLENBQWI7O0FBQ0EsTUFBTUMsU0FBU0QsUUFBUSxlQUFSLENBQWY7O0FBRUEsTUFBTUUsU0FBU0MsU0FBU0MsT0FBT0QsS0FBUCxFQUFjRSxPQUFkLENBQXNCLGFBQ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NcbiAgICAgICAgICAgIC5maWx0ZXIoY2hlY2sgPT4gY2hlY2subGVuZ3RoICE9PSAwKVxuICAgICAgICAgICAgLmZvckVhY2goKGNoZWNrKSA9PiB7XG4gICAgICAgICAgICAgIGlmIChjdHgudXNlQXJyYXlTZWxlY3RvciA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaCguLi5maW5kKGhheXN0YWNrW2ldLCBbY2hlY2tdLCBwYXRoT3V0LCBjdHgpKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaGVja1swXSA9PT0gXCIqKlwiKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgW2NoZWNrLCBjaGVjay5zbGljZSgxKV0sIHBhdGhPdXQsIGN0eCkpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoZXMoY2hlY2tbMF0sIGBbJHtpfV1gLCB0cnVlLCBjdHgpKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgW2NoZWNrLnNsaWNlKDEpXSwgcGF0aE91dCwgY3R4KSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBPYmplY3QuZW50cmllcyhoYXlzdGFjaykuZm9yRWFjaCgoW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgY29uc3QgZXNjYXBlZEtleSA9IGVzY2FwZShrZXkpO1xuICAgICAgICAgIGNvbnN0IHBhdGhPdXQgPSBwYXRoSW4uY29uY2F0KGtleSk7XG4gICAgICAgICAgY2hlY2tzXG4gICAgICAgICAgICAuZmlsdGVyKGNoZWNrID0+IGNoZWNrLmxlbmd0aCAhPT0gMClcbiAgICAgICAgICAgIC5mb3JFYWNoKChjaGVjaykgPT4ge1xuICAgICAgICAgICAgICBpZiAoY2hlY2tbMF0gPT09IFwiKipcIikge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIFtjaGVjaywgY2hlY2suc2xpY2UoMSldLCBwYXRoT3V0LCBjdHgpKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaGVzKGNoZWNrWzBdLCBlc2NhcGVkS2V5LCBmYWxzZSwgY3R4KSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIFtjaGVjay5zbGljZSgxKV0sIHBhdGhPdXQsIGN0eCkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IChuZWVkbGVzLCB7XG4gIGZpbHRlckZuID0gdW5kZWZpbmVkLFxuICBicmVha0ZuID0gdW5kZWZpbmVkLFxuICBjYWxsYmFja0ZuID0gdW5kZWZpbmVkLFxuICBqb2luZWQgPSB0cnVlLFxuICBlc2NhcGVQYXRocyA9IHRydWUsXG4gIHVzZUFycmF5U2VsZWN0b3IgPSB0cnVlXG59ID0ge30pID0+IHtcbiAgY29uc3Qgc2VhcmNoID0gdW5pcShuZWVkbGVzKS5tYXAocGFyc2VyKTtcbiAgY29uc3QgcmVnZXhDYWNoZSA9IHt9O1xuXG4gIHJldHVybiBoYXlzdGFjayA9PiB1bmlxKGZpbmQoaGF5c3RhY2ssIHNlYXJjaCwgW10sIHtcbiAgICBmaWx0ZXJGbiwgYnJlYWtGbiwgY2FsbGJhY2tGbiwgam9pbmVkLCByZWdleENhY2hlLCBlc2NhcGVQYXRocywgdXNlQXJyYXlTZWxlY3RvclxuICB9KSk7XG59O1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1l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IGlmIChBcnJheS5pc0FycmF5KGhheXN0YWNrKSkge1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGhheXN0YWNrLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgY29uc3QgcGF0aE91dCA9IHBhdGhJbi5jb25jYXQoaSk7XG4gICAgICAgICAgY2hlY2tzXG4gICAgICAgICAgICAuZmlsdGVyKGNoZWNrID0+IGNoZWNrLmxlbmd0aCAhPT0gMClcbiAgICAgICAgICAgIC5mb3JFYWNoKChjaGVjaykgPT4ge1xuICAgICAgICAgICAgICBpZiAoY3R4LnVzZUFycmF5U2VsZWN0b3IgPT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgW2NoZWNrXSwgcGF0aE91dCwgY3R4LCBwYXJlbnRzKSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hlY2tbMF0gPT09IFwiKipcIikge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQoaGF5c3RhY2tbaV0sIFtjaGVjaywgY2hlY2suc2xpY2UoMSldLCBwYXRoT3V0LCBjdHgsIHBhcmVudHMuY29uY2F0KFtoYXlzdGFja10pKSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hlcyhjaGVja1swXSwgYFske2l9XWAsIHRydWUsIGN0eCkpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaCguLi5maW5kKGhheXN0YWNrW2ldLCBbY2hlY2suc2xpY2UoMSldLCBwYXRoT3V0LCBjdHgsIHBhcmVudHMuY29uY2F0KFtoYXlzdGFja10pKSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBPYmplY3QuZW50cmllcyhoYXlzdGFjaykuZm9yRWFjaCgoW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgY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IpO1xuICBjb25zdCByZWdleENhY2hlID0ge307XG5cbiAgcmV0dXJuIGhheXN0YWNrID0+IHVuaXEoZmluZChoYXlzdGFjaywgc2VhcmNoLCBbXSwge1xuICAgIGZpbHRlckZuLCBicmVha0ZuLCBjYWxsYmFja0ZuLCBqb2luZWQsIHJlZ2V4Q2FjaGUsIGVzY2FwZVBhdGhzLCB1c2VBcnJheVNlbGVjdG9yXG4gIH0sIFtdKSk7XG59O1xuIl19
{
"name": "object-scan",
"version": "1.5.0",
"version": "1.6.0",
"description": "Find Keys using Wildcard matching and optional value function.",

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

@@ -43,2 +43,8 @@ # Object-Scan

**Note on Functions:**
Signature for all functions is `Fn(key, value, parents)`, where `key` is the key that the function is called for,
`value` is the value of that key and `parents` is an array containing all parents as `[..., grandparent, parent]`.
The `key` argument respects the `joined` option and the `parents` only includes arrays if `useArraySelector` is true.
#### filterFn

@@ -49,3 +55,3 @@

Takes arguments `key` and `value` (value for given key) and called for every intermittent result.
Called for every intermittent result.
If function is defined and returns false, the entry is filtered from the final result.

@@ -58,3 +64,3 @@

Takes arguments `key` and `value` (value for given key) and called for every intermittent result.
Called for every intermittent result.
If function is defined and returns true, all nested entries under the current key are excluded from the result.

@@ -67,3 +73,3 @@

Takes arguments `key` and `value` (value for given key) and called for every final result.
Called for every final result.

@@ -70,0 +76,0 @@ #### joined

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