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

plain-object-merge

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plain-object-merge - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.js

@@ -15,2 +15,4 @@ "use strict";

for (var key in source) {
if (key === 'constructor' || key === 'prototype' || key === '__proto__')
continue;
var value = source[key];

@@ -17,0 +19,0 @@ if (isPrimitive(value)) {

2

package.json
{
"name": "plain-object-merge",
"description": "Extremely fast function optimized for deep merging json-serializable plain objects.",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -27,2 +27,4 @@

if ( key === 'constructor' || key === 'prototype' || key === '__proto__' ) continue;
const value = source[key];

@@ -29,0 +31,0 @@

@@ -28,2 +28,12 @@

it ( 'is not succeptible to prototype pollution issues', t => {
t.deepEqual ( merge ([ {}, { foo: 1, constructor: 2, bar: 3 } ]), { foo: 1, bar: 3 } );
t.deepEqual ( merge ([ {}, { foo: 1, prototype: 2, bar: 3 } ]), { foo: 1, bar: 3 } );
t.deepEqual ( merge ([ {}, { foo: 1, __proto__: 2, bar: 3 } ]), { foo: 1, bar: 3 } );
});
});
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