Babel Getting Started Guide

Babel js Guide -Part 1- The Absolute Must-Know Basics: Plugins, Presets, And Config This article will cover: What is Babel and how to use it in daily development? What are presets and plugins and their differences? What is their execution order in babel execution? Although the title of the original text seems to be a series, the author doe ...

Posted by d3ad1ysp0rk on Sun, 22 May 2022 11:11:57 +0300

Tepi technical team: one-year front-end handwritten Promise

Write Promise from zero In this era of rapid front-end development, if you don't work hard today, you will become garbage tomorrow. Although this is seen on the expression package, I'm sure everyone has seen it. To be honest, this is rough, but this is the case. To get back to business, let's take a look at today's content. Last time we saw th ...

Posted by zytex on Sun, 22 May 2022 08:01:32 +0300

Constructor - prototype - object prototype - constructor property - prototype inheritance - prototype chain

1. Constructor Facing the characteristics of object programming, such as encapsulation and inheritance, can be realized with the help of constructors, but there will be a waste of memory <script> // Constructor function names usually start with uppercase letters // Instance object pointed to by this function Person(x, y) { ...

Posted by richblend on Sun, 22 May 2022 02:42:35 +0300

Function anti-shake of JavaScript common skills

Execute the event after a period of time, and if it fires again within this period, continue to wait for the same amount of time. Anti-shake is still used in many scenarios in actual development, such as real-time search of lists. Delayed execution, it is easy to think of using setTimeout to achieve. Basic Edition function debounce(func, wait) ...

Posted by Ang3l0fDeath on Sat, 21 May 2022 16:02:10 +0300

react/vue markdown editor component

In fact, there are many markdown editor plug-ins. It really doesn't make sense to build wheels repeatedly, but I actually want a markdown editor that can directly upload pictures to qiniu cloud. It feels a little meaningful to me, so such a thing was born characteristic You can directly upload pictures to qiniu cloud by simply setting an extern ...

Posted by fiorelina21 on Sat, 21 May 2022 13:47:31 +0300

Read some records of javascript you don't know

You don't know1, Scope and closure1. Compilation PrincipleGenerally, compilation is divided into three steps:a. Word segmentation and lexical analysis (Tokenizing/Lexing)This process will the entire code(Character string)Break down into meaningful code(For programming languages),These code blocks are called lexical units(token). For example: co ...

Posted by johnathanhebert on Sat, 21 May 2022 12:26:04 +0300

​JDK1.8 new feature: still writing null pointer check code repeatedly? Use Optional now

1. Foreword As a Java programmer, whether a novice or a veteran expert, he must have encountered all kinds of abnormal errors. In a foreign article, the ranking list of exception types is counted, as shown in the following figure: Yes, you're right. NullPointerException tops the list. Charles Antony Richard Hoare, the inventor of Null Referen ...

Posted by habs20 on Sat, 21 May 2022 10:20:38 +0300

Generator learning record

generator Basics The generator has the ability to pause and resume code execution within a function block.Create generator://The asterisk identifying the generator function is not affected by the spaces on both sides function* generator(){ ... } Note: arrow functions cannot be used to define generator functionsCalling the generator f ...

Posted by Coreyjames25 on Sat, 21 May 2022 05:20:49 +0300

Tamping foundation - hand tearing js inheritance

When it comes to JS inheritance, what do you think of first? Advantages and disadvantages of interview inheritance method, JS as a former sufferer, I read and forgot, forgot to see, read and forget, forget it, can't I give up treatment On the vast prairie, ten thousand grass mud horses are galloping. It's been 9012 years. The interviewer hasn't ...

Posted by Angus on Fri, 20 May 2022 21:01:14 +0300

Common methods of string

1.trim() The trim() method removes the white space characters at both ends of the string. The white space characters in this context are all white space characters let getting = ' Hello Word' console.log(getting); //' Hello Word' console.log(getting.trim()); //'Hello Word' 2. length Length indicates the length o ...

Posted by nut legend on Fri, 20 May 2022 03:58:16 +0300