0.1.0-alpha.1 • Published 2 years ago

@toa.io/stream v0.1.0-alpha.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Extended streams

TL;DR

import { Stream } from 'streamo'

function* generate () {
  for (let i = 0; i < 10; i++)
    yield i
}

const stream = new Stream(generate())

const odds = stream.map(x => x + 1).filter(x => x % 2 === 1)