@legtech/namespace
v2.0.0
Published
Provides WSLApp namespace for javascript modules
Downloads
15
Keywords
Readme
Provides WSLApp namespace for javascript modules
This is the basic pattern
WSLApp.ModuleName = (function () {
// Code goes here
})();
To create your own namespace within your application (though most apps just use WSLApp):
// Define this globally
var MyNameSpace = WSL.EnsureNamespace('My.Namespace');
// Other modules can then use your namespace variable
MyNamespace.ModuleName = (function () {
return {
publicFunction: functionName,
};
} ());