Streamlined DOM Events for most.js


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
2313Jun 11, 2021Jan 14, 2016Minified + gzip package size for @most/dom-event in KB


most dom-event

Streamlined DOM events for @most/core. Now you can write:

import { click } from '@most/dom-event';
import { tap, runEffects } from "@most/core";
import { newDefaultScheduler } from "@most/scheduler";

const clickStream = click(el);

runEffects(tap(console.log, clickStream), newDefaultScheduler());


npm install --save @most/dom-event



<eventName> :: (EventTarget t, Event e) => t → boolean=false → Stream e

See the source for all the supported event names. Each has the general signature:

const stream = eventName(domNode, useCapture = false);


domEvent :: (EventTarget t, Event e) => String → t → boolean=false → Stream e

If there's an event type that isn't supported, you can use the general domEvent API:

const stream = domEvent(eventName, domNode, useCapture = false);

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.