# @wireapp/window-namespace-creator

> This repository is part of the source code of Wire. You can find more information at [wire.com](https://wire.com) or by contacting opensource@wire.com.

Latest version **1.0.1** (published 2017-10-23) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @wireapp/window-namespace-creator
pnpm add @wireapp/window-namespace-creator
yarn add @wireapp/window-namespace-creator
bun add @wireapp/window-namespace-creator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-10-23 |
| First published | 2017-10-23 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bennyn |

## Links

- npm: https://www.npmjs.com/package/@wireapp/window-namespace-creator
- Repository: https://github.com/wireapp/webapp-module-namespace
- Homepage: https://github.com/wireapp/webapp-module-namespace#readme
- Issues: https://github.com/wireapp/webapp-module-namespace/issues
- npm.io page: https://npm.io/package/@wireapp/window-namespace-creator

## Recent versions

- 1.0.1 (latest) — 2017-10-23

## README

# Wire

This repository is part of the source code of Wire. You can find more information at [wire.com](https://wire.com) or by contacting opensource@wire.com.

You can find the published source code at [github.com/wireapp/wire](https://github.com/wireapp/wire).

For licensing information, see the attached LICENSE file and the list of third-party licenses at [wire.com/legal/licenses/](https://wire.com/legal/licenses/).

## webapp-module-namespace

Small utility to support [JavaScript Object Management](https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/JavaScript_Object_Management) with namespaces.

### Test
```bash
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');
```

---
_Source: https://npm.io/package/@wireapp/window-namespace-creator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
