Skip to content

feat: add primitive methods and JSON adapters - #18

Merged
ellainng merged 4 commits into
mainfrom
feat/JS-03-primitives-and-adapters
Oct 16, 2026
Merged

ellainng merged 4 commits into
mainfrom
feat/JS-03-primitives-and-adapters

Conversation

@ellainng

@ellainng ellainng commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Add UTF-16-aware String methods, binary64 Number conversion/predicates and prefix parsers, Boolean conversion, and the adopted Math subset. Add the JavaScript.JSON facade with runtime Object/Array values, compact serialization, undefined omission, non-finite null handling and cycle detection. Re-export Fetch and Promise directly from fetch_api.

The standalone JSON package deliberately preserves Python integers. The facade therefore selects standard-library binary64 decoder hooks to preserve nested negative zero and large-number rounding, while reusing the companion serializer for JSON escaping and its public error type. This keeps standalone JSON 0.1.0 behavior stable.

Validation: all 43 local tests pass, including UTF-16 astral/lone surrogates, signed zero, NaN/infinity, parser boundaries, JSON cycles and companion identities. JSON replacers/toJSON hooks are rejected explicitly; broader primitives remain documented future work.

Closes #4. Project: https://github.com/orgs/outside-labs/projects/11

@ellainng
ellainng deleted the branch feat/JS-02-objects-and-arrays October 16, 2026 19:56
@ellainng ellainng closed this Oct 16, 2026
@ellainng ellainng reopened this Oct 16, 2026
@ellainng
ellainng changed the base branch from feat/JS-02-objects-and-arrays to main October 16, 2026 19:58
@ellainng
ellainng merged commit 1a0a86e into main Oct 16, 2026
3 checks passed
@ellainng
ellainng deleted the feat/JS-03-primitives-and-adapters branch October 16, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JS-03: Add primitive methods and companion adapters

1 participant