Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xstream

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xstream - npm Package Compare versions

Comparing version 11.6.0 to 11.7.0

4

extra/fromEvent.d.ts

@@ -112,2 +112,4 @@ /// <reference types="node" />

*/
export default function fromEvent(element: EventTarget | EventEmitter, eventName: string, useCapture?: boolean): Stream<Event | any>;
declare function fromEvent<T = any>(element: EventEmitter, eventName: string): Stream<T>;
declare function fromEvent<T extends Event = Event>(element: EventTarget, eventName: string, useCapture?: boolean): Stream<T>;
export default fromEvent;

@@ -48,91 +48,2 @@ "use strict";

}
/**
* Creates a stream based on either:
* - DOM events with the name `eventName` from a provided target node
* - Events with the name `eventName` from a provided NodeJS EventEmitter
*
* When creating a stream from EventEmitters, if the source event has more than
* one argument all the arguments will be aggregated into an array in the
* result stream.
*
* (Tip: when using this factory with TypeScript, you will need types for
* Node.js because fromEvent knows how to handle both DOM events and Node.js
* EventEmitter. Just install `@types/node`)
*
* Marble diagram:
*
* ```text
* fromEvent(element, eventName)
* ---ev--ev----ev---------------
* ```
*
* Examples:
*
* ```js
* import fromEvent from 'xstream/extra/fromEvent'
*
* const stream = fromEvent(document.querySelector('.button'), 'click')
* .mapTo('Button clicked!')
*
* stream.addListener({
* next: i => console.log(i),
* error: err => console.error(err),
* complete: () => console.log('completed')
* })
* ```
*
* ```text
* > 'Button clicked!'
* > 'Button clicked!'
* > 'Button clicked!'
* ```
*
* ```js
* import fromEvent from 'xstream/extra/fromEvent'
* import {EventEmitter} from 'events'
*
* const MyEmitter = new EventEmitter()
* const stream = fromEvent(MyEmitter, 'foo')
*
* stream.addListener({
* next: i => console.log(i),
* error: err => console.error(err),
* complete: () => console.log('completed')
* })
*
* MyEmitter.emit('foo', 'bar')
* ```
*
* ```text
* > 'bar'
* ```
*
* ```js
* import fromEvent from 'xstream/extra/fromEvent'
* import {EventEmitter} from 'events'
*
* const MyEmitter = new EventEmitter()
* const stream = fromEvent(MyEmitter, 'foo')
*
* stream.addListener({
* next: i => console.log(i),
* error: err => console.error(err),
* complete: () => console.log('completed')
* })
*
* MyEmitter.emit('foo', 'bar', 'baz', 'buzz')
* ```
*
* ```text
* > ['bar', 'baz', 'buzz']
* ```
*
* @factory true
* @param {EventTarget|EventEmitter} element The element upon which to listen.
* @param {string} eventName The name of the event for which to listen.
* @param {boolean?} useCapture An optional boolean that indicates that events of
* this type will be dispatched to the registered listener before being
* dispatched to any EventTarget beneath it in the DOM tree. Defaults to false.
* @return {Stream}
*/
function fromEvent(element, eventName, useCapture) {

@@ -148,2 +59,2 @@ if (useCapture === void 0) { useCapture = false; }

exports.default = fromEvent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJvbUV2ZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2V4dHJhL2Zyb21FdmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLGtDQUFvRTtBQUVwRTtJQUlFLDBCQUFvQixJQUFpQixFQUNqQixTQUFpQixFQUNqQixVQUFtQjtRQUZuQixTQUFJLEdBQUosSUFBSSxDQUFhO1FBQ2pCLGNBQVMsR0FBVCxTQUFTLENBQVE7UUFDakIsZUFBVSxHQUFWLFVBQVUsQ0FBUztRQUxoQyxTQUFJLEdBQUcsV0FBVyxDQUFDO0lBTTFCLENBQUM7SUFFRCxpQ0FBTSxHQUFOLFVBQU8sR0FBNEI7UUFDakMsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFDLENBQUMsSUFBSyxPQUFBLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQVQsQ0FBUyxDQUFDO1FBQ2pDLElBQUksQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBR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+KG5ldyBET01FdmVudFByb2R1Y2VyKGVsZW1lbnQsIGV2ZW50TmFtZSwgdXNlQ2FwdHVyZSkgYXMgYW55KTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBmcm9tRXZlbnQ7XG4iXX0=
{
"name": "xstream",
"version": "11.6.0",
"version": "11.7.0",
"description": "An extremely intuitive, small, and fast functional reactive stream library for JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc