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

assign.js

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assign.js - npm Package Compare versions

Comparing version 1.8.2 to 1.9.0

13

lib/assign.js

@@ -37,6 +37,13 @@ 'use strict'

assigner.copyObject = function ( source, props, object ) {
assigner.blueprinting = function ( blueprinting ) {
this.options.blueprinting = blueprinting
return this
}
assigner.copyObject = function ( source, object ) {
var self = this
object = object || { }
var props = self.options.blueprinting ? Object.keys(object) : Object.keys(source)
var index = -1,

@@ -52,3 +59,3 @@ length = props.length

if (_.isPlainObject( object[key] ) && self.options.recursive )
self.copyObject( source[key], Object.keys(source[key]), object[key] )
self.copyObject( source[key], object[key] )
else

@@ -104,3 +111,3 @@ if ( !self.options.respect || object[key] === null || object[key] === undefined )

if ( element )
self.copyObject( element, Object.keys(element), obj )
self.copyObject( element, obj )
})

@@ -107,0 +114,0 @@ return obj

{
"name": "assign.js",
"version": "1.8.2",
"version": "1.9.0",
"description": "Tiny libary to assign objects",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,12 +0,14 @@

var assigner = require('../lib/assign');
var Assigner = require('../lib/assign')
var assigner = new Assigner()
var a = {
name: 'A',
walking: function(){}
};
walking: function () {}
}
var b = {
name: 'B',
sulking: function(){}
};
sulking: function () {}
}
console.log( assigner.assign( a, b, true ) );
assigner.blueprinting( true )
console.log( assigner.assign( a, b ) )
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