emitter
Faster events controller for class and object
Last updated 9 years ago by iwillwen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install emitter 
SYNC missed versions from official npm registry.

emitter NPM version

Faster events controller for class and object

Installation

$ npm install emitter

Example

import { EventEmitter, Promise } from 'emitter'

// Extend a object
let obj = { /* ... */ }
EventEmitter.extend(obj)

// Create a new emitter
let emitter = new EventEmitter()

// Define a class extend from Promise or EventEmitter
class Machine extends Promise {
  // ...
}

API

  • emitter.Promise()
  • emitter.EventEmitter()

Contributing

  • Fork this Repo first
  • Clone your Repo
  • Install dependencies by $ npm install
  • Checkout a feature branch
  • Feel free to add your features
  • Make sure your features are fully tested
  • Publish your local branch, Open a pull request
  • Enjoy hacking <3

docor built upon love by docor v0.3.0

Current Tags

  • 0.0.5                                ...           latest (9 years ago)

5 Versions

  • 0.0.5                                ...           9 years ago
  • 0.0.4                                ...           9 years ago
  • 0.0.3                                ...           9 years ago
  • 0.0.1                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
Maintainers (2)
Downloads
Total 4
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE