most-from-event
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

most from-event

Node-compatible events for mostjs v2. For instance,

import { fromEvent } from 'most-from-event';

const watcher = fs.watch('./tmp');

const stream = fromEvent(watcher, 'change');

Install

npm install --save most-from-event

API

fromEvent

fromEvent :: (Emitter emt, Event e) => String -> emt -> Stream e

Given an event emitter, return a stream of events:

const stream = fromEvent(eventName, emitter);

fromEventPrepended

fromEventPrepended :: (Emitter emt, Event e) => String -> emt -> Stream e

Same as above, but adds the stream gets the events first (uses prependListener).

Package Sidebar

Install

npm i most-from-event

Weekly Downloads

2

Version

1.1.2

License

MIT

Unpacked Size

9.55 kB

Total Files

8

Last publish

Collaborators

  • hoichi