Direct Link to Github: js-namespace
Working on a multi-person team.
Using many third party libraries.
The basic approach works but is tedious and requires that all parts of the ‘namespace’ be predefined:
1 2 3 4 5 6
For example to create the namespace “Company.Organization.TeamA.Product.Core” one could:
1 2 3 4
If you later decide you want to add Company.Organization.TeamB you have to be extra careful not to override your existing declarations:
1 2 3
After exploring (and using) many of the different solutions available online I decided to write my own. Its simple, easy to use and is my first open source project….ever! I am of course re-inventing the wheel but I wanted to something simple to start my open source journey with.
It is available under the MIT license and the source can be found on github under js-namespace. Its usage is simple.
All namespaces and their immediate children will also have a ‘className’ defined. I’ve found this to be invaluable when logging.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Looks like my public accountability is off to a good start.