Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/worldmaker/xstream-extra-factories
Extra generic factories for xstream
https://github.com/worldmaker/xstream-extra-factories
Last synced: 20 days ago
JSON representation
Extra generic factories for xstream
- Host: GitHub
- URL: https://github.com/worldmaker/xstream-extra-factories
- Owner: WorldMaker
- License: mit
- Created: 2017-05-04T21:13:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-29T17:09:10.000Z (over 4 years ago)
- Last Synced: 2024-12-03T04:43:00.502Z (about 1 month ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xstream-extra-factories
Extra generic factories for xstream
## `forever`
Creates a memory stream of a single item that never completes.
Like `xs.of(item)` but does not send a completion event and always
remembers.## `fromAsyncIterable`
Creates a stream from an async iterable (such as an async generator function: `async function* name()`).
## `fromCancellableDualCallback`
Creates a stream from a "watch" function that expects a success callback, an error callback,
any number of arguments following that, then returns an ID for cancellation. An example would
be `navigator.geolocation.watchPosition()`.## `fromDualCallback`
Creates a stream from a function that expects a success callback, an error callback, then any
number of arguments following that. An example would be `navigator.geolocation.getPosition()`.## `fromNodeCallback`
Creates a stream from a Node-style callback. A Node-style callback
function takes any number of arguments and then lastly a callback of the
form `(error: any, value: T) => void`.