Skip to content

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

Notifications You must be signed in to change notification settings

Andarist/callbag-last-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  })
)

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published