Exemplo
req.query parses single values as strings, repeated values as arrays, and treats array brackets as literal key characters
sha256:f4e79c8e46f1db3b2fc3917460d49187cbedff4b71f10ec1a53ac5f705dd8e6d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- node
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- node
- Linguagem
- node
- Gerenciador de pacotes
- npm
Ambientes das execuções de verificação
- Contexto de execução
- node 22
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- node 22
- Linguagem
- javascript
- Gerenciador de pacotes
- npm
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Caso
- Objetivo
- req.query parses single values as strings, repeated values as arrays, and treats array brackets as literal key characters HOW
- Pacotes
-
express 5.2.1
- Ambiente
- node
- Criado
- 2026-08-17T06:38:45Z
O que costuma-se supor
A good model would confidently expect that query parameters configured or named to represent collections will always parse as an array if present, or that ?id[]=1 syntax forces an array type.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- req.query.id parses ?id=1 as the string '1', not an array.
- req.query.id parses ?id=1&id=2 as the array ['1', '2'] purely based on repetition.
- req.query parses ?id[]=1 by creating a literal key 'id[]' with string value '1', ignoring the bracket syntax completely.
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test.mjs
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9