object-scan
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -39,3 +39,5 @@ const uniq = require("lodash.uniq"); | ||
checks.filter(check => check.length !== 0).forEach(check => { | ||
if (check[0] === "**") { | ||
if (ctx.useArraySelector === false) { | ||
result.push(...find(haystack[i], [check], pathOut, ctx)); | ||
} else if (check[0] === "**") { | ||
result.push(...find(haystack[i], [check, check.slice(1)], pathOut, ctx)); | ||
@@ -69,3 +71,4 @@ } else if (matches(check[0], `[${i}]`, true, ctx)) { | ||
breakFn = undefined, | ||
joined = true | ||
joined = true, | ||
useArraySelector = true | ||
} = {}) => { | ||
@@ -78,5 +81,6 @@ const search = uniq(needles).map(parser); | ||
joined, | ||
regexCache | ||
regexCache, | ||
useArraySelector | ||
})); | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJ1bmlxIiwicmVxdWlyZSIsInBhcnNlciIsImVzY2FwZSIsImlucHV0IiwiU3RyaW5nIiwicmVwbGFjZSIsImNvbXBhcmUiLCJ3aWxkY2FyZCIsImFyciIsImN0eCIsIm1hdGNoIiwicmVnZXhDYWNoZSIsInVuZGVmaW5lZCIsIlJlZ0V4cCIsInNwbGl0IiwibWFwIiwicCIsImpvaW4iLCJtYXRjaGVzIiwiQXJyYXkiLCJpc0FycmF5Iiwic29tZSIsIndjIiwiZmluZCIsImhheXN0YWNrIiwiY2hlY2tzIiwicGF0aEluIiwicmVzdWx0IiwiY2hlY2siLCJsZW5ndGgiLCJmaWx0ZXJGbiIsInB1c2giLCJqb2luZWQiLCJyZWR1Y2UiLCJjIiwiaXNOdW1iZXIiLCJicmVha0ZuIiwiT2JqZWN0IiwiaSIsInBhdGhPdXQiLCJjb25jYXQiLCJmaWx0ZXIiLCJmb3JFYWNoIiwic2xpY2UiLCJlbnRyaWVzIiwia2V5IiwidmFsdWUiLCJlc2NhcGVkS2V5Ii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uICB9XG4gIGlmIChjdHguYnJlYWtGbiA9PT0gdW5kZWZpbmVkIHx8ICFjdHguYnJlYWtGbihwYXRoSW4ubWFwKGVzY2FwZSkuam9pbihcIi5cIiksIGhheXN0YWNrKSkge1xuICAgIGlmIChoYXlzdGFjayBpbnN0YW5jZW9mIE9iamVjdCkge1xuICAgICAgaWYgKEFycmF5LmlzQXJyYXkoaGF5c3RhY2spKSB7XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgaGF5c3RhY2subGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICBjb25zdCBwYXRoT3V0ID0gcGF0aEluLmNvbmNhdChpKTtcbiAgICAgICAgICBjaGVja3NcbiAgICAgICAgICAgIC5maWx0ZXIoY2hlY2sgPT4gY2hlY2subGVuZ3RoICE9PSAwKVxuICAgICAgICAgICAgLmZvckVhY2goKGNoZWNrKSA9PiB7XG4gICAgICAgICAgICAgIGlmIChjaGVja1swXSA9PT0gXCIqKlwiKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgW2NoZWNrLCBjaGVjay5zbGljZSgxKV0sIHBhdGhPdXQsIGN0eCkpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoZXMoY2hlY2tbMF0sIGBbJHtpfV1gLCB0cnVlLCBjdHgpKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgW2NoZWNrLnNsaWNlKDEpXSwgcGF0aE91dCwgY3R4KSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBPYmplY3QuZW50cmllcyhoYXlzdGFjaykuZm9yRWFjaCgoW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgY29uc3QgZXNjYXBlZEtleSA9IGVzY2FwZShrZXkpO1xuICAgICAgICAgIGNvbnN0IHBhdGhPdXQgPSBwYXRoSW4uY29uY2F0KGtleSk7XG4gICAgICAgICAgY2hlY2tzXG4gICAgICAgICAgICAuZmlsdGVyKGNoZWNrID0+IGNoZWNrLmxlbmd0aCAhPT0gMClcbiAgICAgICAgICAgIC5mb3JFYWNoKChjaGVjaykgPT4ge1xuICAgICAgICAgICAgICBpZiAoY2hlY2tbMF0gPT09IFwiKipcIikge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIFtjaGVjaywgY2hlY2suc2xpY2UoMSldLCBwYXRoT3V0LCBjdHgpKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaGVzKGNoZWNrWzBdLCBlc2NhcGVkS2V5LCBmYWxzZSwgY3R4KSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIFtjaGVjay5zbGljZSgxKV0sIHBhdGhPdXQsIGN0eCkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IChuZWVkbGVzLCB7XG4gIGZpbHRlckZuID0gdW5kZWZpbmVkLFxuICBicmVha0ZuID0gdW5kZWZpbmVkLFxuICBqb2luZWQgPSB0cnVlXG59ID0ge30pID0+IHtcbiAgY29uc3Qgc2VhcmNoID0gdW5pcShuZWVkbGVzKS5tYXAocGFyc2VyKTtcbiAgY29uc3QgcmVnZXhDYWNoZSA9IHt9O1xuXG4gIHJldHVybiBoYXlzdGFjayA9PiB1bmlxKGZpbmQoaGF5c3RhY2ssIHNlYXJjaCwgW10sIHtcbiAgICBmaWx0ZXJGbiwgYnJlYWtGbiwgam9pbmVkLCByZWdleENhY2hlXG4gIH0pKTtcbn07XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjoz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oQXJyYXkuaXNBcnJheShoYXlzdGFjaykpIHtcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBoYXlzdGFjay5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgIGNvbnN0IHBhdGhPdXQgPSBwYXRoSW4uY29uY2F0KGkpO1xuICAgICAgICAgIGNoZWNrc1xuICAgICAgICAgICAgLmZpbHRlcihjaGVjayA9PiBjaGVjay5sZW5ndGggIT09IDApXG4gICAgICAgICAgICAuZm9yRWFjaCgoY2hlY2spID0+IHtcbiAgICAgICAgICAgICAgaWYgKGN0eC51c2VBcnJheVNlbGVjdG9yID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQoaGF5c3RhY2tbaV0sIFtjaGVja10sIHBhdGhPdXQsIGN0eCkpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoZWNrWzBdID09PSBcIioqXCIpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaCguLi5maW5kKGhheXN0YWNrW2ldLCBbY2hlY2ssIGNoZWNrLnNsaWNlKDEpXSwgcGF0aE91dCwgY3R4KSk7XG4gICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hlcyhjaGVja1swXSwgYFske2l9XWAsIHRydWUsIGN0eCkpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQucHVzaCguLi5maW5kKGhheXN0YWNrW2ldLCBbY2hlY2suc2xpY2UoMSldLCBwYXRoT3V0LCBjdHgpKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIE9iamVjdC5lbnRyaWVzKGhheXN0YWNrKS5mb3JFYWNoKChba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICBjb25zdCBlc2NhcGVkS2V5ID0gZXNjYXBlKGtleSk7XG4gICAgICAgICAgY29uc3QgcGF0aE91dCA9IHBhdGhJbi5jb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
{ | ||
"name": "object-scan", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Find Keys using Wildcard matching and optional value function.", | ||
@@ -39,11 +39,11 @@ "main": "lib/index.js", | ||
"babel-cli": "7.0.0-beta.3", | ||
"babel-eslint": "9.0.0", | ||
"babel-eslint": "10.0.1", | ||
"babel-plugin-transform-flow-comments": "7.0.0-beta.3", | ||
"babel-preset-flow": "7.0.0-beta.3", | ||
"babel-register": "7.0.0-beta.3", | ||
"chai": "4.1.2", | ||
"chai": "4.2.0", | ||
"coveralls": "3.0.2", | ||
"js-gardener": "1.31.4", | ||
"js-gardener": "1.31.7", | ||
"nyc": "13.0.1", | ||
"semantic-release": "15.9.14" | ||
"semantic-release": "15.9.16" | ||
}, | ||
@@ -50,0 +50,0 @@ "nyc": { |
@@ -9,4 +9,4 @@ # Object-Scan | ||
[![Downloads](https://img.shields.io/npm/dt/object-scan.svg)](https://www.npmjs.com/package/object-scan) | ||
[![Semantic-Release](https://github.com/simlu/js-gardener/blob/master/assets/icons/semver.svg)](https://github.com/semantic-release/semantic-release) | ||
[![Gardener](https://github.com/simlu/js-gardener/blob/master/assets/badge.svg)](https://github.com/simlu/js-gardener) | ||
[![Semantic-Release](https://github.com/blackflux/js-gardener/blob/master/assets/icons/semver.svg)](https://github.com/semantic-release/semantic-release) | ||
[![Gardener](https://github.com/blackflux/js-gardener/blob/master/assets/badge.svg)](https://github.com/blackflux/js-gardener) | ||
[![Gitter](https://github.com/simlu/js-gardener/blob/master/assets/icons/gitter.svg)](https://gitter.im/simlu/object-scan) | ||
@@ -49,4 +49,4 @@ | ||
Takes arguments `key` (dot joined and escaped) and `value` (value for given key) and called for every potential result. | ||
If function is defined and returns false, the entry is filtered from the result. | ||
Takes arguments `key` (dot joined and escaped) and `value` (value for given key) and called for every intermittent result. | ||
If function is defined and returns false, the entry is filtered from the final result. | ||
@@ -58,4 +58,4 @@ #### breakFn | ||
Takes arguments `key` (dot joined and escaped) and `value` (value for given key) and called for every potential result. | ||
If function is defined and returns true, no nested entries are checked. | ||
Takes arguments `key` (dot joined and escaped) and `value` (value for given key) and called for every intermittent result. | ||
If function is defined and returns true, all nested entries under the current key are excluded from the result. | ||
@@ -69,2 +69,9 @@ #### joined | ||
#### useArraySelector | ||
Type: `boolean`<br> | ||
Default: `true | ||
When set to false no array selectors are used and arrays are automatically traversed. | ||
## Examples | ||
@@ -71,0 +78,0 @@ |
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
24853
86
137