Skip to content

Map implementation for pull-streams supporting Promise (or regular) values

Notifications You must be signed in to change notification settings

srcagency/pull-promise-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pull promise map

map implementation for pull-streams supporting regular values and promises as return values.

Similar to pull-promise's through with the key difference that non-promise return values are allowed aligning with how most promise libraries work.

Example

import pull from 'pull-stream'
import map from 'pull-promise-map'

pull(
	pull.values([1, 2, 3]),
	map((x) => Promise.resolve(x * 2)),
	map((x) => x + 1),
	pull.log(),
)
// -> 3, 5, 7

About

Map implementation for pull-streams supporting Promise (or regular) values

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published