Trips Around

Archive for

December 2009

John W


John W's profile »

Tags

  • css (1)
  • gae (1)
  • python (1)
  • testing (1)

Archive

2010 (2)
July (1)
February (1)
2009 (2)
December (1)
October (1)
Subscribe via RSS
December 3, 2009

namespace for javascript

  • Edit
  • Delete
  • Tags
  • Autopost
Namespace is an Erlang inspired method for organizing functions in javascript.

Simple example:

(function(){  namespace("obj", public);   function private(){ return "private" };  function public(){ return private(); }; })();  obj.public(); /* => "private */

For a complete explanation see http://jweir.github.com/namespace/

Tweet
  • 0 responses
  • Like
  • Comment