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

class-builder

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-builder - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

27

index.js

@@ -32,12 +32,2 @@ const BUILD = "build";

// add each method to instance (must have reference
// to self)
for (var each in _methods) {
Object.defineProperty(self, each, {
value: buildMethod(self, _methods[each])
});
}
// workaround how Object.defineProperty works with

@@ -81,2 +71,12 @@ // prototypes to keep properties unenumerable

// add each method to class prototype
for (var each in _methods) {
Object.defineProperty(
constructor.prototype, each, {
value: buildMethod(_methods[each])
});
}
// add each property to class prototype

@@ -98,3 +98,2 @@ for (var each in _properties) {

value: buildMethod(
constructor,
_static.methods[each])

@@ -211,10 +210,10 @@ });

//
// Creates a method from function, with 'this' = 'self'
// Creates a method from function
//
//----------------------------------------------------------
function buildMethod(self, method) {
function buildMethod(method) {
return function () {
return method.apply(self, arguments);
return method.apply(this, arguments);

@@ -221,0 +220,0 @@ }

{
"name": "class-builder",
"version": "1.0.3",
"version": "1.0.4",
"description": "Utility for building classes",

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