3.1.2 • Published 8 months ago

it-map v3.1.2

Weekly downloads
18,165
License
Apache-2.0 OR MIT
Repository
github
Last release
8 months ago

it-map

codecov CI

Maps the values yielded by an async iterator

About

Convert one value from an (async)iterator into another.

Example

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:

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

$ npm i it-map

Browser <script> tag

Loading this module through a script tag will make its exports available as ItMap in the global namespace.

<script src="https://unpkg.com/it-map/dist/index.min.js"></script>

API Docs

License

Licensed under either of

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.

@everything-registry/sub-chunk-1939wnfs-migration@rosen-bridge/rosenet-node@pratikgohil.dev/stackos-v2contract-packageipfs-grpc-serveripfs-demoipfs-http-serveripfs-http-responseipfs-repoipfs-coreipfs-core-utilsipfs-bitswapipfs-block-serviceipfs-core-skogardipfs-unixfs-exporterkahninterface-ipfs-corelibp2p-kad-dhtkubo-rpc-clientkiwistand@xmader/ipfs-http-client@ts-drp/network@topology-foundation/network@tracelabs/kad-dht@vindigo/server@zalastax/nolb-it-@ipfs-flipstarter/cli@chris.troutner/interface-ipfs-core@chris.troutner/ipfs-core@chris.troutner/ipfs-core-utils@chris.troutner/ipfs-grpc-server@chris.troutner/ipfs-http-server@cinderlink/client@byzanlink-bundler/node@libp2p/delegated-routing-v1-http-api-content-routing@libp2p/interface-compliance-tests@libp2p/autonat@libp2p/interface-mocks@libp2p/pnet@libp2p/protocol-adventure@libp2p/interface-stream-muxer-compliance-tests@libp2p/kad-dhtmtcrawleepixiu-swap-corepixiuswap-libs-sdkdatastore-fsdatastore-leveldatastore-coreblockstore-encblockstore-fsblockstore-opfs@sfroment/network@helia/interop@helia/pinning-service-api-server@helia/routers@helia/verified-fetch@helia/bitswap@helia/car@helia/delegated-routing-v1-http-api-client@fluencelabs/js-client@fluencelabs/js-peer@deworker/deworker-cli@galtproject/browser-ipfs@galtproject/js-ipfs@eridanus-network/js-core.peer@dao-xyz/datastore-level@decloudlabs/skynet@decloudlabs/stk-v2@mdip/ipfs-core@mdip/libp2p@douganderson444/ipfs-core@dstanesc/ipfs-core-store-access@skandha/node@questflow/deworker-cli
3.1.2

8 months ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.6

1 year ago

3.0.5

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago