xstream-from-callback
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

xstream-from-callback

Convert a Node.js-style callback (err, data): void to an xstream Stream.

npm install xstream-from-callback

usage

Note: this helper takes a function as input, and returns a function, similar to RxJS bindNodeCallback.

import xsFromCallback from 'xstream-from-callback'
const fs = require('fs');

const stream = xsFromCallback(fs.readFile)('/etc/hosts')

/xstream-from-callback/

    Package Sidebar

    Install

    npm i xstream-from-callback

    Weekly Downloads

    9

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    4.52 kB

    Total Files

    8

    Last publish

    Collaborators

    • staltz