UNPKG

@sanity/migrate

Version:

Tooling for running data migrations on Sanity.io projects

9 lines (8 loc) 189 B
export async function* map<T, U>( it: AsyncIterableIterator<T>, project: (value: T) => U, ): AsyncIterableIterator<U> { for await (const chunk of it) { yield project(chunk) } }