4 ms·
I forked the original to address this [1]. Here's a sample: var strategy = moduleInterfaceFactory.Events = { on: function(strategyFacade, strategyF
by anorwell 13y ago
I forked the original to address this [1]. Here's a sample:
var strategy = moduleInterfaceFactory.Events = {
on: function(strategyFacade, strategyFactoryDecorator, interfaceFacade) {
if (!flyweight(this, "on", strategyFacade, [ strategyFactoryDecorator, interfaceFacade ]) || !strategyFactoryDecorator) return this;
this._events || (this._events = {});
var strategyPattern = this._events[strategyFacade] || (this._events[strategyFacade] = []);
strategyPattern.push({
callback: strategyFactoryDecorator,
context: interfaceFacade,
ctx: interfaceFacade || this
});
return this;
}
[1] https://github.com/ANorwell/beautify-with-words https://github.com/ANorwell/beautify-with-words
- angersock 13y agoWow, it's like an EnterpriseBridgeAdaptor for JavaScript!
- michaelmior 13y agoWhile I find this humorous (which I assume was the goal), I think using common development terminology could be worse than complete jibberish since you start to apply irrelevant meaning when reading the beautified code.