Repository navigation
feat: add primitive methods and JSON adapters - #18
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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