5 ms·
This is really cool! Can anyone explain why deno has made it to MDN but node.js has not?
by stepbeek 5y ago
This is really cool! Can anyone explain why deno has made it to MDN but node.js has not?
- jamil7 5y agoI believe it's because Node.js has never made an effort to implement web APIs nor has it been a goal of the project. Edit: as others have pointed out, APIs that are implemented in Node.js are listed on MDN.
- lucideer 5y agoWorth noting, informationally, it is a goal of the Node.js project to implement web APIs. Deno is just way ahead as it doesn't have to worry about backward compat: it's a much tougher challenge for the Node.js guys, but they are working on it.
- mirekrusin 5y agonodejs is there as well, ie. [0]. Maybe it's missing for apis they don't provide? ie. fetch [1] does not list nodejs. [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [1] https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
- deleted 5y ago[deleted]
- opheliate 5y agoNode is on a number of MDN pages (e.g: [0]). I think it's just APIs that Deno supports and Node doesn't (e.g: fetch) that are linked here, which is why it's not in their support matrices. 0: https://developer.mozilla.org/en-US/docs/Web/API/console/log https://developer.mozilla.org/en-US/docs/Web/API/console/log
- chrismorgan 5y agosetTimeout is linked here, https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWor..., and shows partial support (with explanations) for Node.js.
- styfle 5y agoAlso see TextEncoder or WebAssembly which shows the version support of Node.js and others https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder... https://developer.mozilla.org/en-US/docs/WebAssembly#browser_compatibility https://developer.mozilla.org/en-US/docs/WebAssembly#browser...
- lucideer 5y agonode is on MDN for all browser APIs it implememts, there's just not many of them. Deno has much higher browser compat. It's worth noting this isn't Node's fault: most Node APIs existed before there were browser equivalents and adding browser compat now is much harder for Node than for Deno which is starting from scratch.
- timdaub 5y ago> Deno has much higher browser compat. Is this a fact or a personal feeling? Any links to back up this statement?
- lucacasonato 5y agoThis is a fact. Import maps, fetch, ESM + web import semantics, localstorage, WebGPU, WHATWG streams, WebCrypto. Deno runs the shared web platform test suite: https://deno.co/wptfyi https://deno.co/wptfyi. You can also just look on MDN now and see which APIs are implemented in Deno compared to Node :-)
- timdaub 5y agoIs import maps considered an accepted proposal [1]? What's the point of implementing APIs like WebGPU and localstorage in a non-browser environment? I get WHATWG streams, esm, fetch and WebCrypro though. - 1: https://github.com/WICG/import-maps https://github.com/WICG/import-maps
- vorticalbox 5y agoLocal storage let's you save state across process restarts and session storage let's you share data across worker threads You could save the state of a discord bot across restarts for example.
- norman784 5y agoAbout webgpu > The WebGPU API gives developers a low level, high performance, cross architecture way to program GPU hardware from JavaScript. > GPUs allow programmers to make some numerical algorithms highly parallel. This is useful beyond rendering graphics and games. Effective use of GPUs in Machine Learning has enabled more complex neural networks - https://deno.com/blog/v1.8#experimental-support-for-the-webgpu-api https://deno.com/blog/v1.8#experimental-support-for-the-webg...
- earthboundkid 5y agoBecause Node is the new IE.