npx tutorial

npx tutorial Original author: Ruan Yifeng Date: February 9, 2019 npm Starting from version 5.2, the npx command has been added. It has many uses. This article introduces the main usage scenarios of this command. Node has its own npm module, so you can use the npx command directly. If it doesn’t work, install it… Continue reading npx tutorial

Web Worker usage tutorial

Web Worker usage tutorial Original author: Ruan Yifeng Date: July 8, 2018 I. Overview The JavaScript language uses a single-threaded model, that is, all tasks can only be completed on one thread, and only one thing can be done at a time. The previous tasks have not been completed, and the following tasks can only… Continue reading Web Worker usage tutorial

Browser database IndexedDB introductory tutorial

Browser database IndexedDB introductory tutorial Original author: Ruan Yifeng Date: July 4, 2018 I. Overview With the continuous enhancement of browser functions, more and more websites have begun to consider storing large amounts of data on the client side, which can reduce the data obtained from the server and obtain data directly from the local.… Continue reading Browser database IndexedDB introductory tutorial

JavaScript’s this principle

JavaScript’s this principle Original author: Ruan Yifeng Date: June 18, 2018 1. The origin of the problem To understand the JavaScript language, one sign is to understand the following two ways of writing, which may have different results. var obj = { foo: function () {} }; var foo = obj.foo; // 写法一 obj.foo() //… Continue reading JavaScript’s this principle

Node timer detailed

Node timer detailed Original author: Ruan Yifeng Date: February 23, 2018 JavaScript runs in a single thread, and asynchronous operations are particularly important. As long as you use functions other than the engine, you need to interact with the outside to form an asynchronous operation. Because there are so many asynchronous operations, JavaScript has to… Continue reading Node timer detailed

“Introduction to ES6 Standard (3rd Edition)” is now available!

“Introduction to ES6 Standard (3rd Edition)” is now available! Original author: Ruan Yifeng Date: September 19, 2017 In June 2017, the TC39 committee officially released the “ES2017 Standard” . Compared with two years ago, JavaScript syntax has been greatly upgraded, mainly the introduction of async function and decorator . This makes me think that a… Continue reading “Introduction to ES6 Standard (3rd Edition)” is now available!

Koa framework tutorial

Koa framework tutorial Original author: Ruan Yifeng Date: August 9, 2017 Node is mainly used to develop web applications. This determines that the use of Node is often inseparable from the web application framework. Koa is a simple and easy-to-use web framework. It is characterized by elegance, simplicity, strong expressiveness, and high degree of freedom.… Continue reading Koa framework tutorial

JavaScript memory leak tutorial

JavaScript memory leak tutorial Original author: Ruan Yifeng Date: April 16, 2017 1. What is a memory leak? The operation of the program requires memory. As long as the program requests, the operating system or runtime (runtime) must provide memory. For the continuously running service process (daemon), the memory that is no longer used must… Continue reading JavaScript memory leak tutorial