All Projects → gocanto → Vuemit

gocanto / Vuemit

Licence: mit
The smallest Vue.js events handler.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vuemit

Foxylink
An easy way to handle integration tasks in a reliable way and run them on 1C:Enterprise server
Stars: ✭ 77 (-42.54%)
Mutual labels:  events
Kubernetes Oom Event Generator
Generate a Kubernetes Event when a Pod's container has been OOMKilled
Stars: ✭ 93 (-30.6%)
Mutual labels:  events
Call For Papers
List with open Call for Papers
Stars: ✭ 118 (-11.94%)
Mutual labels:  events
Wanandroid
🔥项目采用 Kotlin 语言,基于 MVP + RxJava + Retrofit + Glide + EventBus 等架构设计,努力打造一款优秀的 [玩Android] 客户端
Stars: ✭ 1,223 (+812.69%)
Mutual labels:  events
Event Target Shim
An implementation of WHATWG EventTarget interface, plus few extensions.
Stars: ✭ 89 (-33.58%)
Mutual labels:  events
Event Espresso Core
Event Espresso 4 Core for WordPress: Build an Event Ticketing Website Today!
Stars: ✭ 107 (-20.15%)
Mutual labels:  events
Eventsourcing
Event Sourcing Library for Rust
Stars: ✭ 71 (-47.01%)
Mutual labels:  events
Image Promise
🎑🤞 Load one or more images, return a promise. Tiny, browser-only, no dependencies.
Stars: ✭ 129 (-3.73%)
Mutual labels:  events
Action
Easy and lazy solution for click-event-binding.
Stars: ✭ 92 (-31.34%)
Mutual labels:  events
Unityanimatorevents
UnityEvents triggered by states inside an Animator. Easy to use and performant.
Stars: ✭ 117 (-12.69%)
Mutual labels:  events
Rabbitevents
Nuwber's events provide a simple observer implementation, allowing you to listen for various events that occur in your current and another application. For example, if you need to react to some event published from another API.
Stars: ✭ 84 (-37.31%)
Mutual labels:  events
React Event
Declarative way to handle events outside / inside of React Component.
Stars: ✭ 90 (-32.84%)
Mutual labels:  events
Samples
Community driven repository for Dapr samples
Stars: ✭ 104 (-22.39%)
Mutual labels:  events
Ease
It's magic.
Stars: ✭ 1,213 (+805.22%)
Mutual labels:  events
Joynr
A transport protocol agnostic (MQTT, HTTP, WebSockets etc.) Franca IDL based communication framework supporting multiple communication paradigms (RPC, Pub-Sub, broadcast etc.)
Stars: ✭ 124 (-7.46%)
Mutual labels:  events
Melbourne Hackathons
Frequently updated list of Hackathons in Melbourne - Watch the repo for live updates!
Stars: ✭ 75 (-44.03%)
Mutual labels:  events
Telemetry poller
Periodically gather measurements and publish them as Telemetry events
Stars: ✭ 101 (-24.63%)
Mutual labels:  events
Sdk Javascript
Javascript SDK for CloudEvents
Stars: ✭ 132 (-1.49%)
Mutual labels:  events
Ethvtx
🌀🛰 ethereum-ready & framework-agnostic redux store configuration
Stars: ✭ 125 (-6.72%)
Mutual labels:  events
Truffle Assertions
🛠 Assertions and utilities for testing Ethereum smart contracts with Truffle unit tests
Stars: ✭ 109 (-18.66%)
Mutual labels:  events

Vuemit

Demo Version Downloads License

Vuemit is a tiny library to work with events on Vue.js. Its aim is to keeping simple the fact of sharing information between any number of components.

Installation

npm install vuemit --save

Gettings started

Require the library within your entry point or your bootstrap file.

window.Vuemit = require('vuemit');

Now you will have a global Vuemit variable which you can use anywhere in your app.

Usage

  • all the methods take the same props as the Original Events, except for the events-names which can be an array.
Vue Vuemit Description
this.$emit() Vuemit.fire() Fire an event/s : takes 2 arguments ('event-name', (optional) data object)
this.$on() Vuemit.listen() Listen for an event/s : takes 2 arguments ('event-name', callback)
this.$once() Vuemit.listenOnce() Listen once to an event/s : takes 2 arguments ('event-name', callback)
this.$off() Vuemit.remove() Remove listeners for an event/s: takes 2 arguments ('event-name', callback)
this.$off() Vuemit.removeListenersFrom() Remove listeners from an event/s: takes 1 arguments ('event-name')
this.$off() Vuemit.removeAll() Remove all event listeners: takes no arguments
  • Vue started to support events array from v2.2.0+ except $emit & $once but with Vuemit you can use events-names as an array with all the methods except removeAll() which takes no arguments.
// fire multiple events with a shared payload
Vuemit.fire(['event1','event2'], {some: data})

// listen once to multiple events with a shared callback
Vuemit.listenOnce(['other-event1', 'other-event2'], ()=>{
    // do something ex."refresh localStorage"
})

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

License

The MIT License (MIT). Please see License File for more information.

How can I thank you?

Why not star the github repo? Why not share the link for this repository on Twitter? Spread the word!

Don't forget to follow me on twitter!

Thanks!

Gustavo Ocanto. [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].