about summary refs log tree commit diff stats
path: root/src/js/encoding.nim
Commit message (Collapse)AuthorAgeFilesLines
* js: proper distinction between Opt/Optionbptato2024-03-241-4/+5
| | | | | | | | | | | | | | | | until now, this had very strange (and inconsistent) semantics: * err() was used for exception propagation, but also as a null value * Option accepted undefined as a none value, but not null * Opt and Option were used interchangeably (and mostly randomly) Now, Result is always used for error reporting, and err(nil) means JS_EXCEPTION. (Opt is a special case of Result where we don't care about the error type, and is not used in JS.) Option on the other hand means "nullable variation of normally non-nullable type", and translates to JS_NULL. In JS we mainly use it for turning strings nullable.
* Replace Chakasu with Chagashibptato2024-02-221-53/+144
| | | | | | The API is horrid :( but at least it copies less. TODO: think of a better API.
* js: merge some type modules into jstypesbptato2024-01-111-2/+1
| | | | They only had type definitions, no need to put them in separate modules.
* javascript: add TextEncoder, TextDecoderbptato2023-10-211-0/+112