# menhera

> an experimental lovely framework

Latest version **0.9.9-rc3** (published 2019-02-04) · MIT license · 29 weekly downloads

## Install

```sh
npm install menhera
pnpm add menhera
yarn add menhera
bun add menhera
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score; declining downloads.

## Facts

| | |
|---|---|
| Version | 0.9.9-rc3 |
| Published | 2019-02-04 |
| First published | 2018-03-29 |
| Weekly downloads | 29 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 325.2 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | koishi, vaiii |

## Links

- npm: https://www.npmjs.com/package/menhera
- npm.io page: https://npm.io/package/menhera

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [lodash.has](https://npm.io/package/lodash.has.md) ^4.5.2
- [lodash.set](https://npm.io/package/lodash.set.md) ^4.3.2

## Recent versions

- 0.9.9-rc3 (latest) — 2019-02-04
- 0.9.9-rc2 — 2019-02-04
- 0.9.9-rc1 — 2019-02-04
- 0.9.8 — 2019-02-04
- 0.9.8-rc5 — 2019-01-29
- 0.9.8-rc4 — 2019-01-29
- 0.9.8-rc3 — 2019-01-29
- 0.9.8-rc2 — 2019-01-29
- 0.9.8-1 — 2019-01-29
- 0.9.7 — 2019-01-29
- 0.9.6 — 2018-12-21
- 0.9.6-rc1 — 2018-12-21
- 0.9.5 — 2018-12-21
- 0.9.4-rc5 — 2018-12-21
- 0.9.4-rc4 — 2018-12-21
- … 124 more at https://npm.io/package/menhera/versions

## README

# Menhera

an experimental lovely framework

### Install

```bash
yarn add menhera
```

### Example

```js
const Mhr = require('menhera').default
const {EventEmitter} = require('events')

const event = new EventEmitter()

Mhr.use({
  $on: {
    $V({_key, _val}) {
      event.on(_key, () => {
        console.log(_val)
      })
    },
    $F({_key, _val}) {
      event.on(_key, _val)
    },
    $O({_key, _val}) {
      for (let [k, v] of Object.entries(_val)) {
        event.on(_key, v)
      }
    },
    $A({_key, _val}) {
      _val.forEach(fn => {
        event.on(_key, fn)
      })
    }
  },
  on: {
    test0: 'test0',
    test1() {
      console.log('test1')
    },
    test2: {
      foo() {
        console.log('test2.foo')
      },
      bar() {
        console.log('test2.bar')
      }
    },
    test3: [
      () => {
        console.log('test3.0')
      },
      () => {
        console.log('test3.1')
      }
    ]
  }
})

event.emit('test0')
event.emit('test1')
event.emit('test2')
event.emit('test3')

// test0
// test1
// test2.foo
// test2.bar
// test3.0
// test3.1
```

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