Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stamp/privatize

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stamp/privatize - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

9

__tests__/index.js

@@ -48,2 +48,11 @@ var compose = require('@stamp/compose');

});
it('should work without any methods defined', function () {
var Stamp = compose(Privatize, {
properties: { bar: 'foo' },
});
var instance = Stamp();
expect(instance.bar).toBeUndefined();
})
});

10

index.js

@@ -22,5 +22,12 @@ var compose = require('@stamp/compose');

var privateMethodNames = descriptor.deepConfiguration.Privatize.methods;
var newObject = {};
privates.set(newObject, this);
var methods = descriptor.methods;
if (!methods) {
return newObject;
}
var methodNames = Object.keys(methods);
var newObject = {};
for (var i = 0; i < methodNames.length; i++) {

@@ -32,3 +39,2 @@ var name = methodNames[i];

}
privates.set(newObject, this);
return newObject;

@@ -35,0 +41,0 @@ }

2

package.json
{
"name": "@stamp/privatize",
"version": "0.1.6",
"version": "0.1.7",
"description": "Protect private properties",

@@ -5,0 +5,0 @@ "main": "index.js",

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