imma
Member since Mar 13, 2015
- Profile: /members/12579-imma.htm
- Comments: 3
Recent Blog Comments By imma
-
Using Method Chaining With The Revealing Module Pattern In JavaScript
Posted on Apr 29, 2015 at 10:17 AM
I think i can clear this bit up : "That said, I am not sure there is a real difference between a factory function and an IIFE" The difference is the II of the IIFE - a factory function is invoked many times to create instances, and IIFE is immediately invoked once to produce a single insta... read more »
-
Using Method Chaining With The Revealing Module Pattern In JavaScript
Posted on Mar 13, 2015 at 7:04 AM
ack, it's stripped out my indenting :-(... read more »
-
Using Method Chaining With The Revealing Module Pattern In JavaScript
Posted on Mar 13, 2015 at 7:04 AM
You could stop it creating separate instances of the get/set methods by caching them in a one-shot closure : var SimpleCache = (function(){ return function SimpleCache() { var cache = Object.create( null ); // Reveal the public API. return({ get: get, has: has, ... read more »