Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

menhera

Package Overview
Dependencies
Maintainers
2
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

menhera

an experimental lovely framework

  • 0.9.8-rc2
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-25%
Maintainers
2
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 29 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc