1.0.1 • Published 7 years ago
@wireapp/window-namespace-creator v1.0.1
Wire
This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.
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');
1.0.1
7 years ago