3 ms·
When reading through the projects list of JS restrictions for "stricter" mode, I was expecting to see that it would limit many different JS concepts. But in fac
by Reubend 10mo ago
When reading through the projects list of JS restrictions for "stricter" mode, I was expecting to see that it would limit many different JS concepts. But in fact none of the things which are impossible in this subset are things I would do in the course of normal programming anyway. I think all of the JS code I've written over the past few years would work out of the box here.
- MobiusHorizons 10mo agoI was surprised by this one that only showed up lower in the document: - Date: only Date.now() is supported. [0] I certainly understand not shipping the js date library especially in an embedded environment both for code-size, and practicality reasons (it's not a great date library), but that would be an issue in many projects (even if you don't use it, libraries yo use almost certainly do. https://github.com/bellard/mquickjs/blob/main/README.md#:~:text=Date:%20only%20Date.now()%20is%20supported. https://github.com/bellard/mquickjs/blob/main/README.md#:~:t...
- Reubend 10mo agoGood catch. I didn't realize that there was a longer list of restrictions below the section called "Stricter mode", and it seems like a lot of String functions I use are missing too.
- MobiusHorizons 10mo ago> String functions: codePointAt, replaceAll, trimStart, trimEnd. As I read it, these are supported es5 extensions, not missing as part of stricter mode.