Skip to content

Instantly share code, notes, and snippets.

@datapimp
Created December 15, 2010 07:44
Show Gist options
  • Save datapimp/741745 to your computer and use it in GitHub Desktop.
Save datapimp/741745 to your computer and use it in GitHub Desktop.
var sys = require("sys")
imbot = {}
try { imbot = module.exports } catch(e){ }
(function(self){
self.bar = function(){
sys.puts("Bar")
return self
}
self.foo = function(){
sys.puts("Foo")
return self
}
self.foobar = function(){
self.foo().bar()
return self
}
})(imbot)
imbot.foobar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment