@wireapp/window-namespace-creator

1.0.1 • Public • Published

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');

Readme

Keywords

none

Package Sidebar

Install

npm i @wireapp/window-namespace-creator

Weekly Downloads

1

Version

1.0.1

License

GPL-3.0

Last publish

Collaborators

  • augustocdias_wire
  • beltram_wire
  • tlebon
  • typfel
  • wireapp-owner
  • wireapp-member