adobe-webplatform / Eve

Licence: apache-2.0
Custom events…

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Eve

react-scroll-activator
A React Component that watches for a scroll event and triggers behavior
Stars: ✭ 19 (-93.49%)
Mutual labels:  events
input-event
🎹 Read and parse input device(like mouse, keyboard, joystick and IR-Remote)'s event data.
Stars: ✭ 45 (-84.59%)
Mutual labels:  events
Events
Python Event Handling the C# Style
Stars: ✭ 260 (-10.96%)
Mutual labels:  events
watermill-http
HTTP Pub/Sub for the Watermill project.
Stars: ✭ 16 (-94.52%)
Mutual labels:  events
horizon-exporter
Export Laravel Horizon metrics using this Prometheus exporter.
Stars: ✭ 17 (-94.18%)
Mutual labels:  events
http-event-stream
📡 Modern spec-compliant Server Sent Events stream implementation.
Stars: ✭ 16 (-94.52%)
Mutual labels:  events
yii2-forms
Forms CRUD - formbuilder, generator code
Stars: ✭ 32 (-89.04%)
Mutual labels:  events
Wisper
A micro library providing Ruby objects with Publish-Subscribe capabilities
Stars: ✭ 3,014 (+932.19%)
Mutual labels:  events
OpenCQRS
.NET Standard framework to create simple and clean design. Advanced features for DDD, CQRS and Event Sourcing.
Stars: ✭ 546 (+86.99%)
Mutual labels:  events
Tx
Tx (LINQ to Events)
Stars: ✭ 261 (-10.62%)
Mutual labels:  events
IwEngine
This is an engine that I initially started building after taking a game coding class in high school. I didn't like Unity so tried to make something more code focused that was personally easier to use.
Stars: ✭ 97 (-66.78%)
Mutual labels:  events
Smart-Inspector
Fluent re-take on Unity Inspector UX. Packed with QoL improvements.
Stars: ✭ 680 (+132.88%)
Mutual labels:  events
react-keyboard-shortcuts
A declarative library for handling hotkeys based on explicit priority in React applications
Stars: ✭ 23 (-92.12%)
Mutual labels:  events
js-training
JS Training Course
Stars: ✭ 39 (-86.64%)
Mutual labels:  events
Laravel Transactional Events
Transaction-aware Event Dispatcher for Laravel
Stars: ✭ 263 (-9.93%)
Mutual labels:  events
spa-bus
🔥Tools for multilevel components to pass values in any SPA
Stars: ✭ 15 (-94.86%)
Mutual labels:  events
sugarcalendar-core
Sugar Calendar plugin for WordPress
Stars: ✭ 40 (-86.3%)
Mutual labels:  events
Default Passive Events
Makes {passive: true} by default when EventListenerOptions are supported
Stars: ✭ 285 (-2.4%)
Mutual labels:  events
Event Sourcing Cqrs Examples
Event Sourcing and CQRS in practice.
Stars: ✭ 265 (-9.25%)
Mutual labels:  events
Circuits
circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.
Stars: ✭ 256 (-12.33%)
Mutual labels:  events

Eve

Tiny event helping JavaScript library.

eve(name, scope, varargs)

Fires event with given name, given scope and other parameters.

Parameters

  • name string name of the event, dot (.) or slash (/) separated
  • scope object context for the event handlers
  • varargs ... the rest of arguments will be sent to event handlers

Returns: object array of returned values from the listeners. Array has two methods .firstDefined() and .lastDefined() to get first or last not undefined value.

eve.listeners(name)

Internal method which gives you array of all event handlers that will be triggered by the given name.

Parameters

  • name string name of the event, dot (.) or slash (/) separated

Returns: array array of event handlers

eve.separator(separator)

If for some reasons you don’t like default separators (. or /) you can specify yours here. Be aware that if you pass a string longer than one character it will be treated as a list of characters.

Parameters

  • separator string new separator. Empty string resets to default: . or /.

eve.on(name, f, name, f)

Binds given event handler with a given name. You can use wildcards “*” for the names:

eve.on("*.under.*", f);
eve("mouse.under.floor"); // triggers f

Use eve to trigger the listener.

Parameters

  • name string name of the event, dot (.) or slash (/) separated, with optional wildcards
  • f function event handler function
  • name array if you don’t want to use separators, you can use array of strings
  • f function event handler function

Returns: function returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.

Example:

eve.on("mouse", eatIt)(2);
eve.on("mouse", scream);
eve.on("mouse", catchIt)(1);

This will ensure that catchIt function will be called before eatIt.

If you want to put your handler before non-indexed handlers, specify a negative value. Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.

eve.f(event, varargs)

Returns function that will fire given event with optional arguments. Arguments that will be passed to the result function will be also concated to the list of final arguments.

el.onclick = eve.f("click", 1, 2);
eve.on("click", function (a, b, c) {
    console.log(a, b, c); // 1, 2, [event object]
});

Parameters

  • event string event name
  • varargs and any other arguments

Returns: function possible event handler function

eve.stop()

Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.

eve.nt([subname])

Could be used inside event handler to figure out actual name of the event.

Parameters

  • subname string subname of the event

Returns: string name of the event, if subname is not specified or

Returns: boolean true, if current event’s name contains subname

eve.nts()

Could be used inside event handler to figure out actual name of the event.

Returns: array names of the event

eve.off(name, f)

Removes given function from the list of event listeners assigned to given name. If no arguments specified all the events will be cleared.

Parameters

  • name string name of the event, dot (.) or slash (/) separated, with optional wildcards
  • f function event handler function

eve.unbind()

See eve.off

eve.once(name, f)

Binds given event handler with a given name to only run once then unbind itself.

eve.once("login", f);
eve("login"); // triggers f
eve("login"); // no listeners

Use eve to trigger the listener.

Parameters

  • name string name of the event, dot (.) or slash (/) separated, with optional wildcards
  • f function event handler function

Returns: function same return function as eve.on

eve.version()

Current version of the library.

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].