Exemplo
Prove that p-limit map’s argument order is iterable-first, not callback-first.
sha256:700635bd470c15e4480d490bad3483a639d29a990016276534d3bf1651a6e366
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Prove that p-limit map’s argument order is iterable-first, not callback-first. HOW
- Pacotes
- p-limit 7.3.1
- Ambiente
- node
- Criado
- 2026-08-17T03:18:11Z
O que costuma-se supor
A competent caller expects `limit.map(mapper, iterable)` like `Array.prototype.map`.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- await pLimit(2).map([1, 2, 3], (value) => value * 2) must resolve to [2, 4, 6]
- pLimit(2).map((value) => value * 2, [1, 2, 3]) must throw a TypeError
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9