is-reactive-streams
Test whether an object is a Reactive Streams component
Platform | Build Status |
---|---|
Linux | |
Windows |
Usage
Installing
NPM
npm i is-reactive-streams
CDN
- jsDelivr
- unpkg
Loading the Module
ESNext
;
CommonJS
const isPublisher isSubscriber isSubscription isProcessor = ;
Browser
A global variable declared as 'IRS' provides the 4 functions.
const isPublisher isSubscriber isSubscription isProcessor = IRS;
API
Objects
- IRS :
object
Functions
- isPublisher(publisher) ⇒
boolean
Test whether an object implements the Publisher interface.
- isSubscriber(subscriber) ⇒
boolean
Test whether an object implements the Subscriber interface.
- isSubscription(subscription) ⇒
boolean
Test whether an object implements the Subscription interface.
- isProcessor(processor) ⇒
boolean
Test whether an object implements the Processor interface.
object
IRS :
boolean
isPublisher(publisher) ⇒ Test whether an object implements the Publisher interface.
Kind: global function
Param | Type | Description |
---|---|---|
publisher | object |
An object that is expected to implement the Publisher interface. |
boolean
isSubscriber(subscriber) ⇒ Test whether an object implements the Subscriber interface.
Kind: global function
Param | Type | Description |
---|---|---|
subscriber | object |
An object that is expected to implement the Subscriber interface. |
boolean
isSubscription(subscription) ⇒ Test whether an object implements the Subscription interface.
Kind: global function
Param | Type | Description |
---|---|---|
subscription | object |
An object that is expected to implement the Subscription interface. |
boolean
isProcessor(processor) ⇒ Test whether an object implements the Processor interface.
Kind: global function
Param | Type | Description |
---|---|---|
processor | object |
An ojbect that is expected to implement the Processor interface. |
Build
Clone the repo first, then run the following to install the dependencies
npm install
To build the coverages, run the test suite, the docs, and the distributable modules:
npm run build