# it-map [![codecov](https://img.shields.io/codecov/c/github/achingbrain/it.svg?style=flat-square)](https://codecov.io/gh/achingbrain/it) [![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/it/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/achingbrain/it/actions/workflows/js-test-and-release.yml?query=branch%3Amain) > Maps the values yielded by an async iterator # About Convert one value from an (async)iterator into another. ## Example ```javascript import map from 'it-map' // This can also be an iterator, generator, etc const values = [0, 1, 2, 3, 4] const result = map(values, (val, index) => val++) console.info(result) // [1, 2, 3, 4, 5] ``` Async sources and transforms must be awaited: ```javascript import map from 'it-map' const values = async function * () { yield * [0, 1, 2, 3, 4] } const result = await map(values(), async (val, index) => val++) console.info(result) // [1, 2, 3, 4, 5] ``` # Install ```console $ npm i it-map ``` ## Browser ` ``` # API Docs - # License Licensed under either of - Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/it/blob/main/packages/it-map/LICENSE-APACHE) / ) - MIT ([LICENSE-MIT](https://github.com/achingbrain/it/blob/main/packages/it-map/LICENSE-MIT) / ) # Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.