JSPM

most-last

2.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 87
  • Score
    100M100P100Q85746F
  • License MIT

Emit the last value of your streams

Package Exports

  • most-last

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (most-last) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

most-last

Wait for your last event to play

Last will wait until your stream ends, and play the very last event that has occurred.

Warning: v2.x is only compatible with @most/core. For the old mostjs, use most-last v1.0.

Get it

npm install --save most-last

Usage

import { iterate, take } from 'most'
import { last } from 'most-last'

const stream = last(take(5, iterate(x => x + 1, 0)))

stream.observe(function (x) {
  if (x === 4) { // true
    ...
  }
})