Note: This article is translated from: https://dev.to/gregfletcher/what-is-deno-js-and-why-should-you-care-b26 . Some common terms I will keep. You can go to the original link for reference.
- Deno.js released version 1.0.0 on May 13, 2020.
- Deno was created by Ryan Dahl, who also created Node.js.
- Deno is protected by default. Without authorization, it cannot access files, networks or environments.
- Deno built-in TypeScript without any additional configuration.
- Many external packages are imported by url (like Go).
- Deno is the name that is reversed from Node and read as Deeno (long e).
May 13 -> Launch date
A lot has happened since Ryan’s talk at JSCONF 2018. Many people have participated in the project, and it has gained 48k stars on Github, and the project is gradually gaining much attention in the community before. when it came out officially.
Only time will tell if Deno will continue to grow, but the initial reaction, according to the writer, is very optimistic.
Top Syntax Features
Top Level Await
No longer wrap around async functions. Only use advanced syntax await.
const data = await fetch('someapi/data');
Import and URLs
You can use import and you don’t need to NPM install all your packages. Much like GoLang, you can import from URLs.
You can use import and you don’t need NPM to install all the packages. Looks like GoLang, you can import from URL.
import stuff from 'https://package/url'
TypeScript Built In
No need to install TypeScript. All have been built-in. You just need to write the code only!
Deno limits access to files, networks and environments. This is a big difference with Node.js, where Node.js allows instant access to everything.
ES6 and more
Compatible with Web
Deno’s API is of course compatible with the Web
Deno support for wasm binaries. (You can read about the wasm binaries here: https://blog.vietnamlab.vn/2018/08/08/gioi-thieu-webassembly-tuong-lai-cua-web/ ).
Deno is an interesting project that you should try!
I want to clarify that this article is not about to bring down Node.js. Node.js is great, I love it and will continue to use Node.js. Is it just better to have a new and improved version out there in the future?