1.9.1 • Published 12 months ago

snoflow v1.9.1

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

SNOFLOW

Examples

Pipe style

await snoflow([1, 2, 3])
    .buffer(2)
    .debounce(100)
    .filter()
    .map((n) => [String(n)])
    .flat()
    .flatMap((n) => [String(n)])
    .tees((s) => s.pipeTo(nils()))
    .limit(1)
    .map(() => 1)
    .peek(() => {})
    .reduce(0, (a, b) => a + b)
    .skip(1)
    .tail(1)
    .throttle(100)
    .done()

Using native ReadableStream snoflow kernels to allow tree-shaking

await new ReadableStream({
    start:(ctrl)=>{
        [1, 2, 3].map(x=> ctrl.enqueue(x))
    }
})
    .pipeThrough(buffers(2))
    .pipeThrough(debounces(100))
    .pipeThrough(filters())
    .pipeThrough(maps((n) => [String(n)]))
    .pipeThrough(flats())
    .pipeThrough(flatMaps((n) => [String(n)]))
    .pipeThrough(teess((s) => s.pipeTo(nils())))
    .pipeThrough(limits(1))
    .pipeThrough(maps(() => 1))
    .pipeThrough(peeks(() => {}))
    .pipeThrough(reduces(0, (a, b) => a + b))
    .pipeThrough(skips(1))
    .pipeThrough(tails(1))
    .pipeThrough(throttles(100))
    .pipeTo(nils())
1.9.1

12 months ago

1.9.0

12 months ago

1.8.3

12 months ago

1.8.2

12 months ago

1.8.1

12 months ago

1.8.0

12 months ago

1.7.4

12 months ago

1.7.3

12 months ago

1.7.2

12 months ago

1.7.1

12 months ago

1.6.2

12 months ago

1.6.1

12 months ago

1.6.0

12 months ago

1.5.0

12 months ago

1.4.8

12 months ago

1.4.7

12 months ago

1.4.6

12 months ago

1.4.5

12 months ago

1.4.4

12 months ago

1.4.3

12 months ago

1.4.2

12 months ago

1.4.1

12 months ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.2

1 year ago