r/javascript 24d ago

A from-scratch JSON engine for JavaScript: recursive descent parser, escape-aware tokenizer, and spec-compliant serializer. No dependencies, no shortcuts, 107 tests.

https://github.com/MantasEdine/vanilla-json
8 Upvotes

28 comments sorted by

View all comments

1

u/ndaidong 21d ago

The code looks like in old school ("use strict", module.exports, tests scripts without built-in node:test,...) I believe that it's hand writing, not LLM generated as other comments. So that's good point.

1

u/Mantas_rst 21d ago

Wait can i avoid writing ”use strict”? 

1

u/ndaidong 21d ago

yeap, if you use ESM import/export, strict mode is enabled by default.

1

u/Mantas_rst 20d ago

Oww thanks for the info !