UNPKG

prray

Version:

'Promisified' Array, comes with async method supports(such as mapAsync). And it is compatible with normal array.

10 lines (7 loc) 240 B
import test from 'ava' import { toPrrayPromise } from './test-utils' const pp = toPrrayPromise([1, 2, 3, 4]) test('prraypromise find', async t => { t.is(await pp.find(x => x === 2), 2) t.is(await pp.find(x => x === 10), undefined) })