3 ms·
This is untrue. There are plenty of modules published to npm which don't use node APIs, often specifically so they can be used in many runtimes. Here's one exa
by tomjakubowski 6y ago
This is untrue. There are plenty of modules published to npm which don't use node APIs, often specifically so they can be used in many runtimes.
Here's one example: https://www.npmjs.com/package/squat https://www.npmjs.com/package/squat
- untog 6y agoOK, to be clearer: almost all the libraries published to NPM that would use the functions in QuickJS’s std module instead use Node modules and there is no compatibility layer. So yes, there are plenty of pure JS modules. But if you want to read a file from a disk you’re going to end up with a library that assumes you’re using Node.