@wireapp/window-namespace-creator
v1.0.1
Published
This repository is part of the source code of Wire. You can find more information at [wire.com](https://wire.com) or by contacting [email protected].
Downloads
3
Keywords
Readme
Wire
This repository is part of the source code of Wire. You can find more information at wire.com or by contacting [email protected].
You can find the published source code at github.com/wireapp/wire.
For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.
webapp-module-namespace
Small utility to support JavaScript Object Management with namespaces.
Test
npm install
grunt test
Usage
To create a namespace like zeta.webapp.module.image.rotation
in plain JavaScript, you have to do something like this:
window.zeta = window.zeta || {};
zeta.webapp = zeta.webapp || {};
zeta.webapp.module = zeta.webapp.module || {};
zeta.webapp.module.image = zeta.webapp.module.image || {};
zeta.webapp.module.image.rotation = zeta.webapp.module.image.rotation || {};
With this small utility provided here, all you have to do is:
Namespace('zeta.webapp.module.image.rotation');