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

putil-merge

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

putil-merge - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

10

lib/merge.js

@@ -30,3 +30,3 @@ /* putil-merge

const mergeValue = function(target, source, clone, deep) {
if (typeof source === 'object') {
if (source && typeof source === 'object') {
// Circular reference detection

@@ -36,2 +36,3 @@ var o;

return o;
visited.put(source, target || 1);

@@ -59,3 +60,3 @@ // If array

const mergeObject = function(target, source, clone, deep) {
const mergeObject = function mergeObject(target, source, clone, deep) {
if (source === target) return target;

@@ -76,3 +77,3 @@ Object.getOwnPropertyNames(source).forEach(function(key) {

const cloneArray = function(source, cloneObjects) {
const cloneArray = function cloneArray(source, cloneObjects) {
if (cloneObjects) {

@@ -171,3 +172,4 @@ // Clone object items

get: function(key) {
return values[keys.indexOf(key)];
const i = keys.indexOf(key);
return i >= 0 ? values[i] : undefined;
}

@@ -174,0 +176,0 @@ };

8

package.json
{
"name": "putil-merge",
"description": "Lightweight solution for merging multiple objects into one. Also it supports deep merge and deep clone",
"version": "1.1.2",
"version": "1.1.3",
"author": "Panates Ltd.",

@@ -19,7 +19,7 @@ "contributors": [

"devDependencies": {
"babel-eslint": "^8.0.0",
"eslint": "^4.7.2",
"babel-eslint": "^8.0.1",
"eslint": "^4.8.0",
"eslint-config-google": "^0.9.1",
"istanbul": "^0.4.5",
"mocha": "^3.5.3"
"mocha": "^4.0.0"
},

@@ -26,0 +26,0 @@ "engines": {

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