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

object-rewrite

Package Overview
Dependencies
Maintainers
1
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-rewrite - npm Package Compare versions

Comparing version 2.1.19 to 2.1.20

6

lib/index.js

@@ -12,3 +12,3 @@ const objectScan = require('object-scan');

}) => {
const scannerInjectAndOverwrite = objectScan(Object.keys(inject).concat(Object.keys(overwrite)), {
const scannerInjectAndOverwrite = objectScan([...new Set(Object.keys(inject).concat(Object.keys(overwrite)))], {
useArraySelector: false,

@@ -40,3 +40,3 @@ joined: false,

const toRetain = [];
const scannerRemoveAndRetain = objectScan(Object.keys(filter).concat(retain), {
const scannerRemoveAndRetain = objectScan([...new Set(Object.keys(filter).concat(retain))], {
useArraySelector: false,

@@ -76,2 +76,2 @@ joined: false,

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJvYmplY3RTY2FuIiwicmVxdWlyZSIsInRyZWUiLCJtb2R1bGUiLCJleHBvcnRzIiwiZmlsdGVyIiwiaW5qZWN0Iiwib3ZlcndyaXRlIiwicmV0YWluIiwicmV0YWluRW1wdHlQYXJlbnRzIiwic2Nhbm5lckluamVjdEFuZE92ZXJ3cml0ZSIsIk9iamVjdCIsImtleXMiLCJjb25jYXQiLCJ1c2VBcnJheVNlbGVjdG9yIiwiam9pbmVkIiwiZmlsdGVyRm4iLCJrZXkiLCJ2YWx1ZSIsImlzTWF0Y2giLCJtYXRjaGVkQnkiLCJwYXJlbnRzIiwic29ydCIsImZvckVhY2giLCJuIiwidW5kZWZpbmVkIiwiYXNzaWduIiwibGFzdFN0cmluZ0luZGV4IiwicmVkdWNlIiwicCIsImMiLCJpZHgiLCJkaXJlY3RQYXJlbnQiLCJzbGljZSIsInRvUmVtb3ZlIiwid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ZXRhaW5cbiAgICAgIGlmIChcbiAgICAgICAgbWF0Y2hlZEJ5LnNvbWUobiA9PiByZXRhaW4uaW5jbHVkZXMobikpXG4gICAgICAgIHx8IChcbiAgICAgICAgICByZXRhaW5FbXB0eVBhcmVudHMgPT09IHRydWVcbiAgICAgICAgICAmJiB0cmF2ZXJzZWRCeS5zb21lKG4gPT4gcmV0YWluLmluY2x1ZGVzKG4pKVxuICAgICAgICApXG4gICAgICApIHtcbiAgICAgICAgdG9SZXRhaW4ucHVzaChrZXkpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfSk7XG5cbiAgcmV0dXJuIChpbnB1dCkgPT4ge1xuICAgIHNjYW5uZXJJbmplY3RBbmRPdmVyd3JpdGUoaW5wdXQpO1xuICAgIHNjYW5uZXJSZW1vdmVBbmRSZXRhaW4oaW5wdXQpO1xuICAgIHRyZWUucHJ1bmUoaW5wdXQsIHRvUmVtb3ZlLCB0b1JldGFpbik7XG4gICAgdG9SZW1vdmUubGVuZ3RoID0gMDtcbiAgICB0b1JldGFpbi5sZW5ndGggPSAwO1xuICB9O1xufTtcbiJdfQ==
{
"name": "object-rewrite",
"version": "2.1.19",
"version": "2.1.20",
"description": "Rewrite an Object",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"eslint": "5.16.0",
"js-gardener": "2.0.10",
"js-gardener": "2.0.11",
"nyc": "14.0.0",

@@ -26,0 +26,0 @@ "semantic-release": "15.13.3"

@@ -82,2 +82,3 @@ # object-rewrite

Needles are specified according to [object-scan](https://github.com/blackflux/object-scan).
However using the exclusion pattern is strongly discouraged.

@@ -90,2 +91,4 @@ Internally the option `useArraySelector` is set to false.

Note that filtering is only applied once the full object traversal has finished.
### Inject

@@ -92,0 +95,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