1.0.0 • Published 7 years ago

@basic-streams/map v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@basic-streams/map

map<T, U>(fn: (x: T) => U, stream: Stream<T>): Stream<U>

Creates a stream containing fn(x) for each value x from the source stream.

import ofMany from "@basic-streams/of-many"
import map from "@basic-streams/map"

const stream = ofMany([1, 2, 3], 5000)
const result = map(x => x * 2, stream)

result(x => {
  console.log(x)
})

// > 2
// > 4
// > 6

// stream: ____1____2____3
// result: ____2____4____6
1.0.0

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago