🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

js.private

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js.private - npm Package Compare versions

Comparing version

to
0.0.8

5

dst/Private.js

@@ -29,3 +29,4 @@ "use strict";

value: function get(context) {
return context[this.key] || this.set(context);
if (!context[this.key]) this.set(context);
return context[this.key];
}

@@ -38,3 +39,3 @@ }, {

if (clone.hasOwnProperty(attr) && clone[attr] instanceof Function) clone[attr] = this.bind(clone[attr], context);
}return context.__defineGetter__(this.key, function () {
}context.__defineGetter__(this.key, function () {
return clone;

@@ -41,0 +42,0 @@ });

2

package.json
{
"name": "js.private",
"version": "0.0.7",
"version": "0.0.8",
"description": "Private properties for objects",

@@ -5,0 +5,0 @@ "main": "./dst/Private.js",

@@ -13,3 +13,4 @@ import Clone from "js.clone";

get( context ){
return context[ this.key ] || this.set( context );
if( !context[ this.key ] ) this.set( context );
return context[ this.key ];
}

@@ -22,3 +23,3 @@

clone[ attr ] = this.bind( clone[ attr ], context );
return context.__defineGetter__( this.key, function(){ return clone; } );
context.__defineGetter__( this.key, function(){ return clone; } );
}

@@ -25,0 +26,0 @@