New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 2.2.1 to 2.2.5

16

lib/assign.js

@@ -37,2 +37,12 @@ 'use strict'

assigner.excluded = function (list) {
this.options.excluded = list
return this
}
assigner.primitives = function (list) {
this.options.primitives = list
return this
}
assigner.blueprinting = function ( blueprinting ) {

@@ -68,5 +78,7 @@ this.options.blueprinting = blueprinting

continue
if ( this.options.excluded && this.options.excluded.indexOf(key) !== -1 )
continue
var ref = this.options.forceful ? source[key] : object[key]
if (_.isPlainObject( ref ) && self.options.recursive ) {
if (_.isPlainObject( ref ) && self.options.recursive && (!this.options.primitives || this.options.primitives.indexOf(key) === -1) ) {
if (this.options.forceful && !object[key]) object[key] = {}

@@ -76,3 +88,3 @@ self.copyObject( source[key], object[key] )

if ( !self.options.respect || object[key] === null || object[key] === undefined )
object[key] = source[key]
object[key] = self.cloneObject( source[key] )
}

@@ -79,0 +91,0 @@ return object

2

package.json
{
"name": "assign.js",
"version": "2.2.1",
"version": "2.2.5",
"description": "Tiny libary to assign objects",

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

@@ -48,2 +48,10 @@ Assign.js - dependency-free very minimal assign function

assigner.attributes( [] )
Defines the list of keys excluded to be assigned.
assigner.primitives( [] )
Defines the list of keys considered as values to be assigned preventing to recursively processed.
assigner.blueprinting( true )

@@ -50,0 +58,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