# mmle-namespace

> Make My Life Easier - namespace

Latest version **3.0.0** (published 2016-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install mmle-namespace
pnpm add mmle-namespace
yarn add mmle-namespace
bun add mmle-namespace
```

## 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 | 3.0.0 |
| Published | 2016-12-08 |
| First published | 2016-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paul Young |
| Maintainers | thammin |
| Keywords | thammin, make, my, life, easier, namespace |

## Links

- npm: https://www.npmjs.com/package/mmle-namespace
- Repository: https://github.com/thammin/mmle-namespace
- Homepage: https://github.com/thammin/mmle-namespace#readme
- Issues: https://github.com/thammin/mmle-namespace/issues
- npm.io page: https://npm.io/package/mmle-namespace

## Recent versions

- 3.0.0 (latest) — 2016-12-08
- 2.1.1 — 2016-12-02
- 2.1.0 — 2016-11-30
- 2.0.0 — 2016-11-28
- 1.0.1 — 2016-11-25
- 1.0.0 — 2016-11-25

## README

# mmle-namespace

> Make My Life Easier when manipulate with namespace

# Usage

#### Node

```shell
npm install mmle-namespace --save-dev
```

#### Browser

```
└── dist
    └── mmle-namespace.js
```

# API

#### `namespace(obj, path, value, [allowOverwrite])`

Setter.

```js
var cats = {};

var name = namespace(cats, 'yellow.small.happy', 'paul');
console.log(cats); // { 'yellow': { 'small': { 'happy': 'paul' } } }
console.log(name); // 'paul'


// when the namespace is already existed
var name = namespace(cats, 'yellow.small.happy', 'thammin');
// throw error


// overwrite the existing namespace
var name = namespace(cats, 'yellow.small.happy', 'thammin', true);
console.log(cats); // { 'yellow': { 'small': { 'happy': 'thammin' } } }
console.log(name); // 'thammin'
```

#### `namespace(obj, path)`

Getter.

```js
var cats = {
  yellow: {
    small: {
      happy: 'thammin'
    }
  }
};

var name = namespace(cats, 'yellow.small.happy');
console.log(name); // 'thammin'
```

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