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

ee-class

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-class - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

3

lib/class.js

@@ -96,2 +96,5 @@ !function(){

var result;
// check if the new keyword was forgotten
if (!this) throw new Error('the class constructor was called without the «new» keyword!');
if (this.init) result = this.init.apply(this, Array.prototype.slice.call(arguments));

@@ -98,0 +101,0 @@ else if (typeof classDefinition.inherits === 'function') classDefinition.inherits.apply(this, Array.prototype.slice.call(arguments));

2

package.json
{
"name" : "ee-class"
, "description" : "A fast prototype based Javascript Class implementation"
, "version" : "1.0.7"
, "version" : "1.0.8"
, "homepage" : "https://github.com/eventEmitter/ee-class"

@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)"

@@ -297,2 +297,3 @@ # ee-class

- 1.0.6: The class contructor function can now return any type that is not undefined as its instance
- 1.0.7: If the class inherits from a nativa javascript object, it will map the super of the init function to it
- 1.0.7: If the class inherits from a native javascript object it will map the super of the init function to it
- 1.0.8: If a class is instantiated without the new keyword it now throws a menaingful error

@@ -201,2 +201,13 @@

describe('[Generic Tests]', function() {
it ('A Class should throw an error when instantiated without the new keyword', function() {
var a = new Class({init: function(){return 2;}});
assert.throws(
function() {
a();
}
);
});
it('#1 - properties', function(){

@@ -203,0 +214,0 @@ var Person = new Class({

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