prototypes
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -67,3 +67,3 @@ 'use strict'; | ||
var value = overwriter[key]; | ||
if (value !== undefined && value !== null) | ||
if (value !== undefined) | ||
{ | ||
@@ -70,0 +70,0 @@ this[key] = value; |
{ | ||
"name": "prototypes", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Some common prototypes for node.js: string.startsWith(), object.countProperties() and more. Facilities for functional programming with objects: object.forEach(), object.filter(). Functions are added safely using Object.defineProperty().", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/prototypes", |
@@ -173,2 +173,8 @@ [![Build Status](https://secure.travis-ci.org/alexfernandez/prototypes.png)](http://travis-ci.org/alexfernandez/prototypes) | ||
*Note*: properties which are `undefined` are not overwritten; | ||
all others (including `null`) are. For instance: | ||
{a: 'a'}.overwriteWith({b: undefined, c: null}); | ||
\=> {a: 'a', c: null} | ||
### object.concat(otherObject) | ||
@@ -175,0 +181,0 @@ |
@@ -58,3 +58,3 @@ 'use strict'; | ||
first.overwriteWith(third); | ||
testing.assertEquals(first.countProperties(), 4, 'Overwritten with third should have 4 properties', callback); | ||
testing.assertEquals(first.countProperties(), 5, 'Overwritten with third should have 4 properties', callback); | ||
testing.assert(first.w === 0, 'Overwritten with 0 should be there', callback); | ||
@@ -61,0 +61,0 @@ testing.success(callback); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
38514
412
0