object-fields
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -43,4 +43,5 @@ const objectScan = require('object-scan'); | ||
joined: false, | ||
breakFn: (key, value, { | ||
traversedBy, | ||
breakFn: ({ | ||
getKey, | ||
getTraversedBy, | ||
matchedBy, | ||
@@ -54,4 +55,7 @@ context | ||
const traversedBy = getTraversedBy(); | ||
if (traversedBy.length === 1) { | ||
// traversed by only '**' => delete and break | ||
const key = getKey(); // traversed by only '**' => delete and break | ||
const directParent = key.slice(0, -1).reduce((p, k) => p[k], context.obj); | ||
@@ -78,2 +82,2 @@ | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJvYmplY3RTY2FuIiwicmVxdWlyZSIsImV4cGFuZGVyIiwibW9kdWxlIiwiZXhwb3J0cyIsInNwbGl0IiwiZmllbGRzIiwicmVzdWx0IiwibWF0Y2giLCJyZXBsYWNlIiwibSIsInAxIiwicDIiLCJtYXAiLCJlIiwiam9pbiIsIlNldCIsImpvaW5SZWMiLCJpbnB1dCIsIk9iamVjdCIsImVudHJpZXMiLCJrZXkiLCJ2YWx1ZSIsImtleXMiLCJsZW5ndGgiLCJmb3JFYWNoIiwicGF0aCIsInJlZHVjZSIsImN1ciIsImFzc2lnbiIsImdldFBhcmVudHMiLCJwcmV2IiwiaWR4IiwiZmlsdGVyIiwicG9zIiwicCIsImMiLCJhZGQiLCJzbGljZSIsIlJldGFpbmVyIiwicmV0YWluZXIiLCJjb25jYXQiLCJ1c2VBcnJheVNlbGVjdG9yIiwiam9pbmVkIiwiYnJlYWtGbiIsInRyYXZlcnNlZEJ5IiwibWF0Y2hlZEJ5IiwiY29udGV4dCIsImRpcmVjdFBhcmVudCIsImsiLCJvYmoiLCJBcnJheSIsImlzQXJyYXkiLCJzcGxpY2UiXSwibWFwcGluZ3MiOiJBQUFBLE1BQU1BLFVBQVUsR0FB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29uY2F0KGZpZWxkcyksIHtcbiAgICB1c2VBcnJheVNlbGVjdG9yOiBmYWxzZSxcbiAgICBqb2luZWQ6IGZhbHNlLFxuICAgIGJyZWFrRm46IChrZXksIHZhbHVlLCB7IHRyYXZlcnNlZEJ5LCBtYXRjaGVkQnksIGNvbnRleHQgfSkgPT4ge1xuICAgICAgaWYgKG1hdGNoZWRCeS5sZW5ndGggPiAxKSB7XG4gICAgICAgIC8vIG1hdGNoZWQgYnkgJyoqJyBhbmQgYW5vdGhlciBuZWVkbGUgPT4ga2VlcCBhbmQgYnJlYWtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodHJhdmVyc2VkQnkubGVuZ3RoID09PSAxKSB7XG4gICAgICAgIC8vIHRyYXZlcnNlZCBieSBvbmx5ICcqKicgPT4gZGVsZXRlIGFuZCBicmVha1xuICAgICAgICBjb25zdCBkaXJlY3RQYXJlbnQgPSBrZXkuc2xpY2UoMCwgLTEpXG4gICAgICAgICAgLnJlZHVjZSgocCwgaykgPT4gcFtrXSwgY29udGV4dC5vYmopO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShkaXJlY3RQYXJlbnQpKSB7XG4gICAgICAgICAgZGlyZWN0UGFyZW50LnNwbGljZShrZXlba2V5Lmxlbmd0aCAtIDFdLCAxKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBkZWxldGUgZGlyZWN0UGFyZW50W2tleVtrZXkubGVuZ3RoIC0gMV1dO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICAgLy8gbG9vayBmdXJ0aGVyXG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9KTtcbiAgcmV0dXJuIChvYmopID0+IHtcbiAgICByZXRhaW5lcihvYmosIHsgb2JqIH0pO1xuICB9O1xufTtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJz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EpIHtcbiAgICAgICAgLy8gbWF0Y2hlZCBieSAnKionIGFuZCBhbm90aGVyIG5lZWRsZSA9PiBrZWVwIGFuZCBicmVha1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGNvbnN0IHRyYXZlcnNlZEJ5ID0gZ2V0VHJhdmVyc2VkQnkoKTtcbiAgICAgIGlmICh0cmF2ZXJzZWRCeS5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgY29uc3Qga2V5ID0gZ2V0S2V5KCk7XG4gICAgICAgIC8vIHRyYXZlcnNlZCBieSBvbmx5ICcqKicgPT4gZGVsZXRlIGFuZCBicmVha1xuICAgICAgICBjb25zdCBkaXJlY3RQYXJlbnQgPSBrZXkuc2xpY2UoMCwgLTEpXG4gICAgICAgICAgLnJlZHVjZSgocCwgaykgPT4gcFtrXSwgY29udGV4dC5vYmopO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShkaXJlY3RQYXJlbnQpKSB7XG4gICAgICAgICAgZGlyZWN0UGFyZW50LnNwbGljZShrZXlba2V5Lmxlbmd0aCAtIDFdLCAxKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBkZWxldGUgZGlyZWN0UGFyZW50W2tleVtrZXkubGVuZ3RoIC0gMV1dO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICAgLy8gbG9vayBmdXJ0aGVyXG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9KTtcbiAgcmV0dXJuIChvYmopID0+IHtcbiAgICByZXRhaW5lcihvYmosIHsgb2JqIH0pO1xuICB9O1xufTtcbiJdfQ== |
{ | ||
"name": "object-fields", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Utility functions around nested object fields", | ||
"main": "lib/index.js", | ||
"dependencies": { | ||
"object-scan": "11.1.1" | ||
"object-scan": "13.0.0" | ||
}, | ||
@@ -25,3 +25,3 @@ "devDependencies": { | ||
"eslint-plugin-mocha": "6.3.0", | ||
"js-gardener": "2.0.148", | ||
"js-gardener": "2.0.149", | ||
"nyc": "15.0.1", | ||
@@ -28,0 +28,0 @@ "semantic-release": "17.0.4" |
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
15570
62
+ Addedobject-scan@13.0.0(transitive)
- Removedobject-scan@11.1.1(transitive)
Updatedobject-scan@13.0.0