Skip to content

Pull-stream version of Array.prototype.some returning a promise

Notifications You must be signed in to change notification settings

srcagency/psp-find

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pull stream find

A pull-stream version of Array.prototype.find returning a promise.

find(test)
const {pull, values, map} = require('pull-stream')
const find = require('psp-find')

pull(
  values([1, 2, 3, 4]),
  find((x) => x > 2)
).then(console.log)
// 3

pull(
  values([1, 2, 3]),
  find((x) => x + 3 === 5)
).then(console.log)
// 2

pull(
  values([1, 2, 3]),
  find((x) => x > 4)
).then(console.log)
// undefined

About

Pull-stream version of Array.prototype.some returning a promise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published