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

jclass

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jclass - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

27

index.js
/**
* jclass v1.1.4
* jclass v1.1.6
* https://github.com/riga/jclass

@@ -264,3 +264,26 @@ *

BaseClass._convert = function(cls, options) {
return BaseClass._extend(cls.prototype, {}, options);
// the properties consist of the class' prototype
var instanceMembers = cls.prototype;
// add the constructor function
instanceMembers.init = function() {
// simply create an instance of our target class
var origin = this._origin = BaseClass._construct(cls, arguments);
// add properties for each own property in _origin
for (var key in instanceMembers) {
if (!this._origin.hasOwnProperty(key)) {
continue;
}
Object.defineProperty(this, key, {
get: function() {
return origin[key];
}
});
}
};
// finally, create and return our new class
return BaseClass._extend(instanceMembers, {}, options);
};

@@ -267,0 +290,0 @@

2

package.json
{
"name": "jclass",
"preferGlobal": false,
"version": "1.1.5",
"version": "1.1.6",
"author": "Marcel Rieger <marcelrieger@icloud.com>",

@@ -6,0 +6,0 @@ "description": "Advanced but lightweight and fast Javascript inheritance model providing class members and prototype conversion.",

@@ -161,2 +161,3 @@ # jclass

The instance of the (original) prototyped class is stored as ``_origin`` in each jclass instance.

@@ -163,0 +164,0 @@

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