Javascript library for declaring and calling functions and variables using namespaces