Socket
Socket
Sign inDemoInstall

prototypes

Package Overview
Dependencies
0
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.2 to 0.3.3

2

lib/object.js

@@ -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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc