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

moog

Package Overview
Dependencies
Maintainers
12
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moog - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

index.js

@@ -197,3 +197,3 @@ (function() {

}
step.afterConstruct(that, options);
step.afterConstruct(that);
}

@@ -200,0 +200,0 @@ });

{
"name": "moog",
"version": "0.1.2",
"version": "0.1.3",
"description": "Moog provides powerful module subclassing.",

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

@@ -157,2 +157,4 @@ # moog

0.1.3: never pass `options` to `afterConstruct`. We formerly were correctly leaving it off in the async case, but passing it in the sync case.
0.1.2: Updated some documentation.

@@ -159,0 +161,0 @@

@@ -700,2 +700,29 @@ var assert = require('assert');

it('should invoke afterConstruct with sync only', function() {
var moog = require('../index.js')({});
moog.define('baseClass', {
construct: function(self, options) {
self.monkeys = 3;
},
afterConstruct: function(self) {
self.monkeys = 5;
}
});
moog.define('subClass', {
extend: 'baseClass',
construct: function(self, options) {
self.monkeys = 4;
},
afterConstruct: function(self) {
self.monkeys = 7;
}
});
var item = moog.create('subClass', {});
assert(item);
assert(item.monkeys === 7);
});
it('should handle a sync error in `construct`', function(done) {

@@ -702,0 +729,0 @@ var moog = require('../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