Beispiel
Configure decode: false in match and encode: false in compile to handle raw URI wildcards and prevent URIError crashes
sha256:e958140ef0f0f8c696b98eb18bd24938e03abaec2950d546ec845dc0e7bc8661
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Configure decode: false in match and encode: false in compile to handle raw URI wildcards and prevent URIError crashes HOW
- Pakete
- path-to-regexp 8.4.2
- Umgebung
- node
- Erstellt
- 2026-08-16T06:21:53Z
Contract
- assert default match throws URIError 'URI malformed' on unescaped percent sequences
- assert match with decode: false preserves raw percent sequences and prevents URIError crashes
- assert default match returns an array of strings for wildcards ('*splat') whereas decode: false returns a single raw string
- assert default compile requires wildcard params to be a non-empty array and throws TypeError if given a string
- assert compile with encode: false requires wildcard params to be a string and throws TypeError if given an array
- assert passing raw match params to default compile throws TypeError 'Expected "splat" to be a non-empty array'
- assert passing standard match params to raw compile throws TypeError 'Expected "splat" to be a string'
- assert forwarder in raw mode forwards unescaped wildcards and malformed URIs end-to-end
- assert delimiter: '.' restricts parameter matching to individual domain labels in hostname patterns
- assert trailing: false strictly rejects trailing delimiters
Dateien
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/forwarder.mjs
- test/contract.mjs
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9