0.0.1 • Published 6 years ago

@ya-wxapp-org/bus v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@ya-wxapp-org/bus

NPM version NPM downloads

Install

yarn add @ya-wxapp-org/bus

Usage

import bus from '@ya-wxapp-org/bus'

// methods
bus.on('eventName', (val) => { /* callback */ })
bus.emit('eventName, val) // emit Event

bus.push('key', something) // like array.push
bus.pop('key') // get something

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

@ya-wxapp-org/bus © fimars, Released under the MIT License. Authored and maintained by fimars with help from contributors (list).

github.com/fimars · GitHub @fimars · Twitter @fimars