1.0.2 • Published 3 years ago

@gen-x/run v1.0.2

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

@gen-x/run

The run utility is a shorthand to run the pipeline without opening up a for loop:

import genX from '@gen-x/core'
import run from '@gen-x/run'

const iterate = genX(() => [1, 2, 3, 4], console.info)

run(iterate)

// 1
// 2
// 3
// 4

You can also pass an initial argument:

import genX from '@gen-x/core'
import run from '@gen-x/run'

const iterate = genX((x) => x + 1, console.info)

run(iterate, 1)

// 2
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago

0.0.0

4 years ago