mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
URL with its readable and writable fields and a linked searchParams, URL.canParse/parse; URLSearchParams from strings, records, pairs and other params, with live iterators; Headers with name and value validation, combined values and set-cookie kept apart in the host's order; crypto.randomUUID and getRandomValues from /dev/urandom; and structuredClone over the data kinds, rejecting the rest with DataCloneError. Writing a read-only accessor (RegExp flags, Uint8Array length, size, TextDecoder fields, URL origin) throws the reference's TypeError. Adds the url crate (pure Rust WHATWG URL parser) with idna_adapter pinned to 1.1, which maps IDNA with the unicode-rs crates instead of ICU4X; the stripped embed example grows from 3512936 to 3879376 bytes. Built-in iterators over URLSearchParams and Headers report the reference's tags.
4 lines
421 B
JavaScript
4 lines
421 B
JavaScript
const r = []
|
|
for (const f of [() => { /x/.source = 1 }, () => { new Uint8Array(1).length = 3 }, () => { new URLSearchParams().size = 3 }, () => { new TextDecoder().encoding = "x" }, () => { /x/.lastIndex = 2; return 1 }]) { try { r.push(f()) } catch (e) { r.push(e.message) } }
|
|
for (const f of [() => { new Map().size = 1 }, () => { new Set().size = 1 }]) { try { r.push(f()) } catch (e) { r.push(e.message) } }
|
|
return r
|