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.8.0 to 1.9.0

25

lib/index.js

@@ -30,12 +30,10 @@ const uniq = require("lodash.uniq");

if (compiler.isFinal(search)) {
if (ctx.excludeFn === undefined || ctx.excludeFn(formatPath(pathIn, ctx), haystack, {
parents,
needles: compiler.getNeedles(search)
}) !== true) {
if (compiler.isMatch(search)) {
if (ctx.excludeFn === undefined || ctx.excludeFn(formatPath(pathIn, ctx), haystack, Object.assign(compiler.getMeta(search), {
parents
})) !== true) {
if (ctx.callbackFn !== undefined) {
ctx.callbackFn(formatPath(pathIn, ctx), haystack, {
parents,
needles: compiler.getNeedles(search)
});
ctx.callbackFn(formatPath(pathIn, ctx), haystack, Object.assign(compiler.getMeta(search), {
parents
}));
}

@@ -47,6 +45,5 @@

if (ctx.breakFn === undefined || ctx.breakFn(formatPath(pathIn, ctx), haystack, {
parents,
needles: compiler.getNeedles(search)
}) !== true) {
if (ctx.breakFn === undefined || ctx.breakFn(formatPath(pathIn, ctx), haystack, Object.assign(compiler.getMeta(search), {
parents
})) !== true) {
if (haystack instanceof Object) {

@@ -105,2 +102,2 @@ if (Array.isArray(haystack)) {

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJ1bmlxIiwicmVxdWlyZSIsImNvbXBpbGVyIiwiZXNjYXBlIiwiaW5wdXQiLCJTdHJpbmciLCJyZXBsYWNlIiwiY29tcGFyZSIsIndpbGRjYXJkIiwiYXJyIiwiY3R4IiwibWF0Y2giLCJyZWdleENhY2hlIiwidW5kZWZpbmVkIiwiUmVnRXhwIiwic3BsaXQiLCJtYXAiLCJwIiwiam9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5kKGhheXN0YWNrW2ldLCBzLCBwYXRoT3V0LCBwYXJlbnRzLmNvbmNhdChbaGF5c3RhY2tdKSwgY3R4KSkpO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoZXMoZW50cnksIGBbJHtpfV1gLCB0cnVlLCBjdHgpKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goLi4uZmluZChoYXlzdGFja1tpXSwgc3ViU2VhcmNoLCBwYXRoT3V0LCBwYXJlbnRzLmNvbmNhdChbaGF5c3RhY2tdKSwgY3R4KSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBPYmplY3QuZW50cmllcyhoYXlzdGFjaykuZm9yRWFjaCgoW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgY29uc3QgZXNjYXBlZEtleSA9IGVzY2FwZShrZXkpO1xuICAgICAgICAgIGNvbnN0IHBhdGhPdXQgPSBwYXRoSW4uY29uY2F0KGtleSk7XG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMoc2VhcmNoKVxuICAgICAgICAgICAgLmZvckVhY2goKFtlbnRyeSwgc3ViU2VhcmNoXSkgPT4ge1xuICAgICAgICAgICAgICBpZiAoZW50cnkgPT09IFwiKipcIikge1xuICAgICAgICAgICAgICAgIFtzdWJTZWFyY2gsIHNlYXJjaF0uZm9yRWFjaChzID0+IHJlc3VsdFxuICAgICAgICAgICAgICAgICAgLnB1c2goLi4uZmluZCh2YWx1ZSwgcywgcGF0aE91dCwgcGFyZW50cy5jb25jYXQoW2hheXN0YWNrXSksIGN0eCkpKTtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaGVzKGVudHJ5LCBlc2NhcGVkS2V5LCBmYWxzZSwgY3R4KSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKC4uLmZpbmQodmFsdWUsIHN1YlNlYXJjaCwgcGF0aE91dCwgcGFyZW50cy5jb25jYXQoW2hheXN0YWNrXSksIGN0eCkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHJldHVybiByZXN1bHQ7XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IChuZWVkbGVzLCB7XG4gIGV4Y2x1ZGVGbiA9IHVuZGVmaW5lZCxcbiAgYnJlYWtGbiA9IHVuZGVmaW5lZCxcbiAgY2FsbGJhY2tGbiA9IHVuZGVmaW5lZCxcbiAgam9pbmVkID0gdHJ1ZSxcbiAgZXNjYXBlUGF0aHMgPSB0cnVlLFxuICB1c2VBcnJheVNlbGVjdG9yID0gdHJ1ZVxufSA9IHt9KSA9PiB7XG4gIGNvbnN0IHNlYXJjaCA9IGNvbXBpbGVyLmNvbXBpbGUodW5pcShuZWVkbGVzKSk7XG4gIGNvbnN0IHJlZ2V4Q2FjaGUgPSB7fTtcblxuICByZXR1cm4gaGF5c3RhY2sgPT4gdW5pcShmaW5kKGhheXN0YWNrLCBzZWFyY2gsIFtdLCBbXSwge1xuICAgIGV4Y2x1ZGVGbixcbiAgICBicmVha0ZuLFxuICAgIGNhbGxiYWNrRm4sXG4gICAgam9pbmVkLFxuICAgIHJlZ2V4Q2FjaGUsXG4gICAgZXNjYXBlUGF0aHMsXG4gICAgdXNlQXJyYXlTZWxlY3RvclxuICB9KSk7XG59O1xuIl19
/* compile needles to hierarchical map object */
const parser = require("./parser");
const FINAL = Symbol("final");
const IS_MATCH = Symbol("isMatch");
const markFinal = input => Object.defineProperty(input, FINAL, {
const markMatch = input => Object.defineProperty(input, IS_MATCH, {
value: true,

@@ -11,4 +11,15 @@ writable: false

module.exports.isFinal = input => input[FINAL] === true;
const isMatch = input => input[IS_MATCH] === true;
module.exports.isMatch = isMatch;
const NEEDLE = Symbol("needle");
const setNeedle = (input, needle) => Object.defineProperty(input, NEEDLE, {
value: needle,
writable: false
});
const getNeedle = input => input[NEEDLE] || null;
module.exports.getNeedle = getNeedle;
const NEEDLES = Symbol("needles");

@@ -27,4 +38,12 @@

module.exports.getNeedles = input => [...input[NEEDLES]];
const getNeedles = input => [...input[NEEDLES]];
module.exports.getNeedles = getNeedles;
module.exports.getMeta = input => ({
isMatch: isMatch(input),
needle: getNeedle(input),
needles: getNeedles(input)
});
const buildRecursive = (tower, path, needle) => {

@@ -34,3 +53,4 @@ addNeedle(tower, needle);

if (path.length === 0) {
markFinal(tower);
setNeedle(tower, needle);
markMatch(tower);
return;

@@ -58,2 +78,2 @@ }

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2NvbXBpbGVyLmpzIl0sIm5hbWVzIjpbInBhcnNlciIsInJlcXVpcmUiLCJGSU5BTCIsIlN5bWJvbCIsIm1hcmtGaW5hbCIsImlucHV0IiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJ2YWx1ZSIsIndyaXRhYmxlIiwibW9kdWxlIiwiZXhwb3J0cyIsImlzRmluYWwiLCJORUVETEVTIiwiYWRkTmVlZGxlIiwibmVlZGxlIiwidW5kZWZpbmVkIiwiU2V0IiwiYWRkIiwiZ2V0TmVlZGxlcyIsImJ1aWxkUmVjdXJzaXZlIiwidG93ZXIiLCJwYXRoIiwibGVuZ3RoIiwiQXJyYXkiLCJpc0FycmF5IiwiZm9yRWFjaCIsImMiLCJzbGljZSIsImFzc2lnbiIsImNvbXBpbGUiLCJuZWVkbGVzIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBLE1BQU1BLFNBQVNDLFFBQVEsVUFBUixDQUFmOztBQUVBLE1BQU1DLFFBQVFDLE9BQU8sT0FBUCxDQUFkOztBQUNBLE1BQU1DLFlBQVlDLFNBQVNDLE9BQU9DLGNBQVAsQ0FBc0JGLEtBQXRCLEVBQTZCSCxLQUE3QixFQUFvQztBQUFFTSxTQUFPLElBQVQ7QUFBZU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mVlZGxlID0+IGJ1aWxkUmVjdXJzaXZlKHRvd2VyLCBwYXJzZXIobmVlZGxlKSwgbmVlZGxlKSk7XG4gIHJldHVybiB0b3dlcjtcbn07XG4iXX0=
{
"name": "object-scan",
"version": "1.8.0",
"version": "1.9.0",
"description": "Find Keys using Wildcard matching and optional value function.",

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

@@ -45,6 +45,8 @@ # Object-Scan

**Note on Functions:**
Signature for all functions is `Fn(key, value, { parents, needles })`, where:
Signature for all functions is `Fn(key, value, { parents, isMatch, needle, needles })`, where:
- `key` is the key that the function is called for (respects `joined` option).
- `value` is the value of that key.
- `parents` is an array containing all parents as `[..., grandparent, parent]` (includes arrays iff `useArraySelector` is true).
- `isMatch` is true if this is a valid (intermittent) result.
- `needle` is the needle that matches if `isMatch` is true, otherwise `null`.
- `needles` are all needles that triggered the function call.

@@ -51,0 +53,0 @@

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