Closed n1t0 closed 11 years ago
like.
@pierrevalade :)
Updated
Can you give me an example of how you plan to use expose
?
exports.factory = fwk.factory.expose(factory); Where factory is the one which inherits from fwk.factory.get Le 29 nov. 2012 17:23, "Stanislas Polu" notifications@github.com a écrit :
Can you give me an example of how you plan to use expose ?
— Reply to this email directly or view it on GitHubhttps://github.com/teleportd/fwk/pull/10#issuecomment-10854760.
how would this be different from:
exports.factory = myfactory({});
I was more looking for something that would install a get method that returns a singleton of the factory
// in myfactory.js
var myfactory = function(spec, my) {
//...
var that = fwk.factory(spec, my);
//...
return that;
}
fwk.factory_expose(exports);
Then
// anywhere
var factory = require('myfactory.).get(); // singleton
Changes made as discussed
OK
change discussed to be added