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 2.2.5 to 2.3.0

4

lib/assign.js

@@ -103,3 +103,5 @@ 'use strict'

if (this.options.typed && source[key]._type )
if ( self.options.excluded && self.options.excluded.indexOf(key) !== -1 )
continue
if (self.options.typed && source[key]._type )
object[ key ] = source.value || source.defaultValue || source.defaultvalue

@@ -106,0 +108,0 @@ else

{
"name": "assign.js",
"version": "2.2.5",
"version": "2.3.0",
"description": "Tiny libary to assign objects",

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

@@ -9,3 +9,3 @@ 'use strict'

describe('Assign.js', function () {
let assigner = new Assigner()
let assigner = new Assigner().excluded(['age'])
let person = {

@@ -33,2 +33,3 @@ name: 'Phil',

cloned.extra.spectrum[1] = 200
expect( cloned ).to.not.have.property('age')
expect( cloned.extra.spectrum ).to.eql( [ 1, 200, 3, 4, 5 ] )

@@ -35,0 +36,0 @@ expect( person.extra.spectrum ).to.eql( [ 1, 2, 3, 4, 5 ] )

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