object-scan
Advanced tools
Comparing version 1.9.2 to 1.9.3
@@ -7,20 +7,18 @@ const uniq = require("lodash.uniq"); | ||
const compare = (wildcard, input, arr, ctx) => { | ||
if (arr && !wildcard.match(/^\[.*]$/)) { | ||
return false; | ||
const matches = (wildcard, key, isArray, subSearch) => { | ||
if (wildcard === (isArray ? "[*]" : "*")) { | ||
return true; | ||
} | ||
if (ctx.regexCache[wildcard] === undefined) { | ||
ctx.regexCache[wildcard] = new RegExp(`^${wildcard.split(/(?<!\\)(?:\\\\)*\*/).map(p => p.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')).join(".*")}$`); | ||
if (isArray && !wildcard.match(/^\[.*]$/)) { | ||
return false; | ||
} | ||
return input.match(ctx.regexCache[wildcard]); | ||
return (isArray ? `[${key}]` : escape(key)).match(compiler.getWildcardRegex(subSearch)); | ||
}; | ||
const matches = (wildcard, input, arr, ctx) => wildcard === (arr ? "[*]" : "*") || compare(wildcard, input, arr, ctx); | ||
const formatPath = (input, ctx) => ctx.joined ? input.reduce((p, c) => { | ||
const isNumber = typeof c === "number"; // eslint-disable-next-line no-nested-ternary | ||
return `${p}${p === "" || isNumber ? "" : "."}${isNumber ? `[${c}]` : ctx.escapePaths ? escape(c) : c}`; | ||
return `${p}${isNumber || p === "" ? "" : "."}${isNumber ? `[${c}]` : ctx.escapePaths ? escape(c) : c}`; | ||
}, "") : input; | ||
@@ -59,3 +57,2 @@ | ||
Object.entries(haystack).forEach(([key, value]) => { | ||
const escapedKey = isArray ? `[${key}]` : escape(key); | ||
const pathOut = pathIn.concat(isArray ? parseInt(key, 10) : key); | ||
@@ -65,3 +62,3 @@ Object.entries(search).forEach(([entry, subSearch]) => { | ||
[subSearch, search].forEach(s => result.push(...find(value, s, pathOut, parents.concat([haystack]), ctx))); | ||
} else if (matches(entry, escapedKey, isArray, ctx)) { | ||
} else if (matches(entry, key, isArray, subSearch)) { | ||
result.push(...find(value, subSearch, pathOut, parents.concat([haystack]), ctx)); | ||
@@ -84,15 +81,10 @@ } | ||
useArraySelector = true | ||
} = {}) => { | ||
const search = compiler.compile(uniq(needles)); | ||
const regexCache = {}; | ||
return haystack => uniq(find(haystack, search, [], [], { | ||
excludeFn, | ||
breakFn, | ||
callbackFn, | ||
joined, | ||
regexCache, | ||
escapePaths, | ||
useArraySelector | ||
})); | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJ1bmlxIiwicmVxdWlyZSIsImNvbXBpbGVyIiwiZXNjYXBlIiwiaW5wdXQiLCJTdHJpbmciLCJyZXBsYWNlIiwiY29tcGFyZSIsIndpbGRjYXJkIiwiYXJyIiwiY3R4IiwibWF0Y2giLCJyZWdleENhY2hlIiwidW5kZWZpbmVkIiwiUmVnRXhwIiwic3BsaXQiLCJtYXAiLCJwIiwiam9pbiIsIm1hdGNoZXMiLCJmb3JtYXRQYXRoIiwiam9pbmVkIiwicmVkdWNlIiwiYyIsImlzTnVtYmVyIiwiZXNjYXBlUGF0aHMiLCJmaW5kIiwiaGF5c3RhY2siLCJzZWFyY2giLCJwYXRoSW4iLCJwYXJlbnRzIiwicmVzdWx0IiwidXNlQXJyYXlTZWxlY3RvciIsIkFycmF5IiwiaXNBcnJheSIsImkiLCJsZW5ndGgiLCJwdXNoIiwiY29uY2F0IiwiaXNNYXRjaCIsImV4Y2x1ZGVGbiIsIk9iamVjdCIsImFzc2lnbiIsImdldE1ldGEiLCJjYWxsYmFja0ZuIiwiYnJlYWtGbiIsImVudHJpZXMiLCJmb3JFYWNoIiwia2V5IiwidmFsdWUiLCJlc2NhcGVkS2V5IiwicGF0aE91dCIsInBhcnNlSW50IiwiZW50cnkiLCJzdWJTZWFyY2giLCJzIiwibW9kdWxlIiwiZXhwb3J0cyIsIm5lZWRsZXMiLCJjb21waWxlIl0sIm1hcHBpbmdzIjoiQUFBQSxNQUFNQSxPQUFPQyxRQUF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VmaW5lZCxcbiAgYnJlYWtGbiA9IHVuZGVmaW5lZCxcbiAgY2FsbGJhY2tGbiA9IHVuZGVmaW5lZCxcbiAgam9pbmVkID0gdHJ1ZSxcbiAgZXNjYXBlUGF0aHMgPSB0cnVlLFxuICB1c2VBcnJheVNlbGVjdG9yID0gdHJ1ZVxufSA9IHt9KSA9PiB7XG4gIGNvbnN0IHNlYXJjaCA9IGNvbXBpbGVyLmNvbXBpbGUodW5pcShuZWVkbGVzKSk7XG4gIGNvbnN0IHJlZ2V4Q2FjaGUgPSB7fTtcblxuICByZXR1cm4gaGF5c3RhY2sgPT4gdW5pcShmaW5kKGhheXN0YWNrLCBzZWFyY2gsIFtdLCBbXSwge1xuICAgIGV4Y2x1ZGVGbixcbiAgICBicmVha0ZuLFxuICAgIGNhbGxiYWNrRm4sXG4gICAgam9pbmVkLFxuICAgIHJlZ2V4Q2FjaGUsXG4gICAgZXNjYXBlUGF0aHMsXG4gICAgdXNlQXJyYXlTZWxlY3RvclxuICB9KSk7XG59O1xuIl19 | ||
} = {}) => haystack => uniq(find(haystack, compiler.compile(uniq(needles)), [], [], { | ||
excludeFn, | ||
breakFn, | ||
callbackFn, | ||
joined, | ||
escapePaths, | ||
useArraySelector | ||
})); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJ1bmlxIiwicmVxdWlyZSIsImNvbXBpbGVyIiwiZXNjYXBlIiwiaW5wdXQiLCJTdHJpbmciLCJyZXBsYWNlIiwibWF0Y2hlcyIsIndpbGRjYXJkIiwia2V5IiwiaXNBcnJheSIsInN1YlNlYXJjaCIsIm1hdGNoIiwiZ2V0V2lsZGNhcmRSZWdleCIsImZvcm1hdFBhdGgiLCJjdHgiLCJqb2luZWQiLCJyZWR1Y2UiLCJwIiwiYyIsImlzTnVtYmVyIiwiZXNjYXBlUGF0aHMiLCJmaW5kIiwia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gICAuZm9yRWFjaChzID0+IHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIHMsIHBhdGhPdXQsIHBhcmVudHMuY29uY2F0KFtoYXlzdGFja10pLCBjdHgpKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoZXMoZW50cnksIGtleSwgaXNBcnJheSwgc3ViU2VhcmNoKSkge1xuICAgICAgICAgICAgICByZXN1bHQucHVzaCguLi5maW5kKHZhbHVlLCBzdWJTZWFyY2gsIHBhdGhPdXQsIHBhcmVudHMuY29uY2F0KFtoYXlzdGFja10pLCBjdHgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuICByZXR1cm4gcmVzdWx0O1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSAobmVlZGxlcywge1xuICBleGNsdWRlRm4gPSB1bmRlZmluZWQsXG4gIGJyZWFrRm4gPSB1bmRlZmluZWQsXG4gIGNhbGxiYWNrRm4gPSB1bmRlZmluZWQsXG4gIGpvaW5lZCA9IHRydWUsXG4gIGVzY2FwZVBhdGhzID0gdHJ1ZSxcbiAgdXNlQXJyYXlTZWxlY3RvciA9IHRydWVcbn0gPSB7fSkgPT4gaGF5c3RhY2sgPT4gdW5pcShmaW5kKGhheXN0YWNrLCBjb21waWxlci5jb21waWxlKHVuaXEobmVlZGxlcykpLCBbXSwgW10sIHtcbiAgZXhjbHVkZUZuLFxuICBicmVha0ZuLFxuICBjYWxsYmFja0ZuLFxuICBqb2luZWQsXG4gIGVzY2FwZVBhdGhzLFxuICB1c2VBcnJheVNlbGVjdG9yXG59KSk7XG4iXX0= |
@@ -40,3 +40,15 @@ /* compile needles to hierarchical map object */ | ||
module.exports.getNeedles = getNeedles; | ||
const WILDCARD_REGEX = Symbol("wildcard-regex"); | ||
const setWildcardRegex = (input, wildcard) => { | ||
Object.defineProperty(input, WILDCARD_REGEX, { | ||
value: new RegExp(`^${wildcard.split(/(?<!\\)(?:\\\\)*\*/).map(p => p.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')).join(".*")}$`), | ||
writable: false | ||
}); | ||
}; | ||
const getWildcardRegex = input => input[WILDCARD_REGEX]; | ||
module.exports.getWildcardRegex = getWildcardRegex; | ||
module.exports.getMeta = input => ({ | ||
@@ -66,2 +78,3 @@ isMatch: isMatch(input), | ||
}); | ||
setWildcardRegex(tower[path[0]], path[0]); | ||
} | ||
@@ -77,2 +90,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbInBhcnNlciIsInJlcXVpcmUiLCJJU19NQVRDSCIsIlN5bWJvbCIsIm1hcmtNYXRjaCIsImlucHV0IiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJ2YWx1ZSIsIndyaXRhYmxlIiwiaXNNYXRjaCIsIm1vZHVsZSIsImV4cG9ydHMiLCJORUVETEUiLCJzZXROZWVkbGUiLCJuZWVkbGUiLCJnZXROZWVkbGUiLCJORUVETEVTIiwiYWRkTmVlZGxlIiwidW5kZWZpbmVkIiwiU2V0IiwiYWRkIiwiZ2V0TmVlZGxlcyIsImdldE1ldGEiLCJuZWVkbGVzIiwiYnVpbGRSZWN1cnNpdmUiLCJ0b3dlciIsInBhdGgiLCJsZW5ndGgiLCJBcnJheSIsImlzQXJyYXkiLCJmb3JFYWNoIiwiYyIsInNsaWNlIiwiYXNzaWduIiwiY29tcGlsZSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQSxNQUFNQSxTQUFTQyxRQUFRLFVBQVIsQ0FBZjs7QUFFQSxNQUFNQyxXQUFXQyxPQUFPLFNBQVAsQ0FBakI7O0FBQ0EsTUFBTUMsWUFBWUMsU0FBU0MsT0FBT0MsY0FBUCxDQUFzQkYsS0FBdEIsRUFBNkJILFFBQTdCLEVBQXVDO0FBQUV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G93ZXIsIG5lZWRsZSk7XG4gIGlmIChwYXRoLmxlbmd0aCA9PT0gMCkge1xuICAgIHNldE5lZWRsZSh0b3dlciwgbmVlZGxlKTtcbiAgICBtYXJrTWF0Y2godG93ZXIpO1xuICAgIHJldHVybjtcbiAgfVxuICBpZiAoQXJyYXkuaXNBcnJheShwYXRoWzBdKSkge1xuICAgIHBhdGhbMF0uZm9yRWFjaChjID0+IGJ1aWxkUmVjdXJzaXZlKHRvd2VyLCBbYywgLi4ucGF0aC5zbGljZSgxKV0sIG5lZWRsZSkpO1xuICAgIHJldHVybjtcbiAgfVxuICBpZiAodG93ZXJbcGF0aFswXV0gPT09IHVuZGVmaW5lZCkge1xuICAgIE9iamVjdC5hc3NpZ24odG93ZXIsIHsgW3BhdGhbMF1dOiB7fSB9KTtcbiAgICBzZXRXaWxkY2FyZFJlZ2V4KHRvd2VyW3BhdGhbMF1dLCBwYXRoWzBdKTtcbiAgfVxuICBidWlsZFJlY3Vyc2l2ZSh0b3dlcltwYXRoWzBdXSwgcGF0aC5zbGljZSgxKSwgbmVlZGxlKTtcbn07XG5cbm1vZHVsZS5leHBvcnRzLmNvbXBpbGUgPSAobmVlZGxlcykgPT4ge1xuICBjb25zdCB0b3dlciA9IHt9O1xuICBuZWVkbGVzLmZvckVhY2gobmVlZGxlID0+IGJ1aWxkUmVjdXJzaXZlKHRvd2VyLCBwYXJzZXIobmVlZGxlKSwgbmVlZGxlKSk7XG4gIHJldHVybiB0b3dlcjtcbn07XG4iXX0= |
@@ -1,5 +0,5 @@ | ||
const guid = require("./guid"); | ||
const crypto = require("crypto"); | ||
module.exports = input => { | ||
const tmpSep = guid(); | ||
const tmpSep = crypto.randomBytes(16).toString('base64'); | ||
return input // split at "." and before "[", but only if not escaped | ||
@@ -17,2 +17,2 @@ .replace(/(?<!\\|^)((?:\\{2})*)(?:\.|(?=\[))(?!\[?$)/g, (_, esc) => `${esc}${tmpSep}`).split(tmpSep) // handle or groups | ||
}; | ||
//# sourceMappingUR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3JlIFwiW1wiLCBidXQgb25seSBpZiBub3QgZXNjYXBlZFxuICAgIC5yZXBsYWNlKC8oPzwhXFxcXHxeKSgoPzpcXFxcezJ9KSopKD86XFwufCg/PVxcWykpKD8hXFxbPyQpL2csIChfLCBlc2MpID0+IGAke2VzY30ke3RtcFNlcH1gKVxuICAgIC5zcGxpdCh0bXBTZXApXG4gICAgLy8gaGFuZGxlIG9yIGdyb3Vwc1xuICAgIC5tYXAoKGUpID0+IHtcbiAgICAgIGNvbnN0IG9yTWF0Y2hlcyA9IFtdO1xuICAgICAgLy8gaGFuZGxlIGJhc2ljIG9yLWdyb3Vwc1xuICAgICAgZS5yZXBsYWNlKC9eeyguKyl9JC9nLCAoY29tcGxldGUsIG0pID0+IG9yTWF0Y2hlcy5wdXNoKC4uLm1cbiAgICAgICAgLy8gc3BsaXQgYXQgXCIsXCIsIGJ1dCBvbmx5IGlmIG5vdCBlc2NhcGVkXG4gICAgICAgIC5yZXBsYWNlKC8oPzwhXFxcXHxeKSgoPzpcXFxcezJ9KSopKD86LCkoPyEkKS9nLCAoXywgZXNjKSA9PiBgJHtlc2N9JHt0bXBTZXB9YClcbiAgICAgICAgLnNwbGl0KHRtcFNlcCkpKTtcbiAgICAgIC8vIGhhbmRsZSBsaXN0IG9yLWdyb3VwcyAob25seSBudW1iZXJzKVxuICAgICAgZS5yZXBsYWNlKC9eXFxbeyhcXGQrKD86LFxcZCspKil9XSQvZywgKGNvbXBsZXRlLCBtKSA9PiBvck1hdGNoZXMucHVzaCguLi5tLnNwbGl0KFwiLFwiKS5tYXAoaWR4ID0+IGBbJHtpZHh9XWApKSk7XG4gICAgICByZXR1cm4gb3JNYXRjaGVzLmxlbmd0aCA9PT0gMCA/IGUgOiBvck1hdGNoZXM7XG4gICAgfSk7XG59O1xuIl19 |
{ | ||
"name": "object-scan", | ||
"version": "1.9.2", | ||
"version": "1.9.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
149
32539
6