callbag-last-element

2.0.0 • Public • Published

callbag-last-element

Callbag operator that emits only the last item emitted by the source.

Example

import forEach from 'callbag-for-each'
import interval from 'callbag-interval'
import last from 'callbag-last-element'
import pipe from 'callbag-pipe'
import take from 'callbag-take'
 
pipe(
  interval(100),
  take(5),
  last,
  forEach(v => {
    console.log(v) // will log 4
  })
)

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i callbag-last-element

    Weekly Downloads

    815

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    5.62 kB

    Total Files

    7

    Last publish

    Collaborators

    • andarist