menhera
an experimental lovely framework
Last updated 2 years ago by koishi .
MIT · Original npm · Tarball · package.json
$ cnpm install menhera 
SYNC missed versions from official npm registry.

Menhera

an experimental lovely framework

Install

yarn add menhera

Example

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

Current Tags

  • 0.9.9-rc3                                ...           latest (2 years ago)

139 Versions

  • 0.9.9-rc3                                ...           2 years ago
  • 0.9.9-rc2                                ...           2 years ago
  • 0.9.9-rc1                                ...           2 years ago
  • 0.9.8                                ...           2 years ago
  • 0.9.8-rc5                                ...           2 years ago
  • 0.9.8-rc4                                ...           2 years ago
  • 0.9.8-rc3                                ...           2 years ago
  • 0.9.8-rc2                                ...           2 years ago
  • 0.9.8-1                                ...           2 years ago
  • 0.9.7                                ...           2 years ago
  • 0.9.6                                ...           2 years ago
  • 0.9.6-rc1                                ...           2 years ago
  • 0.9.5                                ...           2 years ago
  • 0.9.4-rc5                                ...           2 years ago
  • 0.9.4-rc4                                ...           2 years ago
  • 0.9.4-rc3                                ...           2 years ago
  • 0.9.4-rc2                                ...           2 years ago
  • 0.9.4-rc1                                ...           2 years ago
  • 0.9.3                                ...           2 years ago
  • 0.9.2-rc8                                ...           2 years ago
  • 0.9.2-rc7                                ...           2 years ago
  • 0.9.2-rc6                                ...           2 years ago
  • 0.9.2-rc5                                ...           2 years ago
  • 0.9.2-rc4                                ...           2 years ago
  • 0.9.2-rc3                                ...           2 years ago
  • 0.9.2-rc2                                ...           2 years ago
  • 0.9.2-rc1                                ...           2 years ago
  • 0.9.1                                ...           2 years ago
  • 0.9.1-rc1                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.5-rc2                                ...           2 years ago
  • 0.8.5-rc1                                ...           2 years ago
  • 0.8.4                                ...           2 years ago
  • 0.8.3-rc1                                ...           2 years ago
  • 0.8.2                                ...           2 years ago
  • 0.8.1-rc4                                ...           2 years ago
  • 0.8.1-rc3                                ...           2 years ago
  • 0.8.1-rc2                                ...           2 years ago
  • 0.8.1-rc1                                ...           3 years ago
  • 0.8.0                                ...           3 years ago
  • 0.7.8-rc1                                ...           3 years ago
  • 0.7.7                                ...           3 years ago
  • 0.7.6-rc6                                ...           3 years ago
  • 0.7.6-rc1                                ...           3 years ago
  • 0.7.5-rc4                                ...           3 years ago
  • 0.7.6                                ...           3 years ago
  • 0.7.5-rc3                                ...           3 years ago
  • 0.7.5-rc2                                ...           3 years ago
  • 0.7.5-rc1                                ...           3 years ago
  • 0.7.5                                ...           3 years ago
  • 0.7.4-rc2                                ...           3 years ago
  • 0.7.4-rc1                                ...           3 years ago
  • 0.7.3                                ...           3 years ago
  • 0.7.2                                ...           3 years ago
  • 0.7.1-rc2                                ...           3 years ago
  • 0.7.1-rc                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.9                                ...           3 years ago
  • 0.6.8-rc3                                ...           3 years ago
  • 0.6.8-rc2                                ...           3 years ago
  • 0.6.8-rc1                                ...           3 years ago
  • 0.6.7-rc10                                ...           3 years ago
  • 0.6.7-rc9                                ...           3 years ago
  • 0.6.7-rc8                                ...           3 years ago
  • 0.6.7-rc7                                ...           3 years ago
  • 0.6.7-rc6                                ...           3 years ago
  • 0.6.7-rc5                                ...           3 years ago
  • 0.6.7-rc4                                ...           3 years ago
  • 0.6.7-rc3                                ...           3 years ago
  • 0.6.7-rc2                                ...           3 years ago
  • 0.6.7-rc1                                ...           3 years ago
  • 0.6.6                                ...           3 years ago
  • 0.6.6-rc3                                ...           3 years ago
  • 0.6.6-rc2                                ...           3 years ago
  • 0.6.6-rc1                                ...           3 years ago
  • 0.6.5                                ...           3 years ago
  • 0.6.4-rc4                                ...           3 years ago
  • 0.6.4-rc3                                ...           3 years ago
  • 0.6.4-rc2                                ...           3 years ago
  • 0.6.4-rc1                                ...           3 years ago
  • 0.6.3                                ...           3 years ago
  • 0.6.2                                ...           3 years ago
  • 0.6.2-rc1                                ...           3 years ago
  • 0.6.1                                ...           3 years ago
  • 0.6.1-rc6                                ...           3 years ago
  • 0.6.1-rc5                                ...           3 years ago
  • 0.6.1-rc4                                ...           3 years ago
  • 0.6.1-rc3                                ...           3 years ago
  • 0.6.1-rc2                                ...           3 years ago
  • 0.6.1-rc1                                ...           3 years ago
  • 0.6.0-rc1                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.9-rc3                                ...           3 years ago
  • 0.5.9-rc2                                ...           3 years ago
  • 0.5.9-rc1                                ...           3 years ago
  • 0.5.8                                ...           3 years ago
  • 0.5.7                                ...           3 years ago
  • 0.5.6                                ...           3 years ago
  • 0.5.5                                ...           3 years ago
  • 0.5.4                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.8                                ...           3 years ago
  • 0.4.7                                ...           3 years ago
  • 0.4.6                                ...           3 years ago
  • 0.4.5                                ...           3 years ago
  • 0.4.4                                ...           3 years ago
  • 0.4.2                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.6                                ...           3 years ago
  • 0.3.5                                ...           3 years ago
  • 0.3.4                                ...           3 years ago
  • 0.3.3                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.9                                ...           3 years ago
  • 0.1.8                                ...           3 years ago
  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (5)

Copyright 2014 - 2017 © taobao.org |