callbag-throw-error

1.0.1 • Public • Published

callbag-throw-error

Callbag source factory that immediately emits an error.

Example

import concat from 'callbag-concat'
import of from 'callbag-of'
import pipe from 'callbag-pipe'
import subscribe from 'callbag-subscribe'
import throwError from 'callbag-throw-error'
 
pipe(
  concat(of(1, 2, 3), throwError('err'))
  subscribe({
    next: value => {
      console.log(value) // 1 2 3
    },
    error: err => {
      console.log(err) // 'err'
    },
  }),
)

/callbag-throw-error/

    Package Sidebar

    Install

    npm i callbag-throw-error

    Weekly Downloads

    959

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    2.47 kB

    Total Files

    4

    Last publish

    Collaborators

    • andarist