map
Basic usage
A map that handles callback functions that return a promise.
import { map } from 'radash'
const userIds = [1, 2, 3, 4]
const users = await map(userIds, async (userId) => { return await api.users.find(userId)})
A map that handles callback functions that return a promise.
import { map } from 'radash'
const userIds = [1, 2, 3, 4]
const users = await map(userIds, async (userId) => { return await api.users.find(userId)})