Tag:ECMAScript

  • Using native es module in node.js

    Time:2019-12-10

    Original: using ES modules natively in node.js By Axel rauschmayer Starting from version 8.5.0, node.js supports native es modules, which can be turned on through command-line options. Much of the new functionality is due to Bradley Farias. 1. demo The code directory structure of this example is as follows: esm-demo/ lib.mjs main.mjs lib.mjs: export function […]

  • Preliminary construction of my new favorite Vue a series project

    Time:2019-12-9

    Starting to learn Vue, every night, the learning cycle is about 2 weeks. In the process, I will collect and sort out Internet resources, and combine my own practice to create a new set of learning materials with my own style. This is my new favorite Vue. We will explain the relevant literature that we […]

  • Basic use of eslint

    Time:2019-12-8

    The programming style of JavaScript With the development of front-end projects, JavaScript accounts for a large proportion. Good writing style is needed to improve the efficiency of code collaboration among multiple people. Besides, code still needs to be read by people. Therefore, code with high readability and maintainability is of great significance in many cases. […]

  • There are three ways for Vue project to implement on-demand loading: asynchronous component of Vue, import () of ES proposal, and require.ensure () of webpack

    Time:2019-12-7

    1. Vue asynchronous component technology Vue router configures the route, and uses the asynchronous component technology of Vue to load on demand. However, in this case, a component generates a JS file.For example: { path: ‘/promisedemo’, name: ‘PromiseDemo’, component: resolve => require([‘../components/PromiseDemo’], resolve) } 2. Import of ES proposal () This is recommended (requires webback […]

  • JavaScript to typescript 1 – what is typescript

    Time:2019-12-6

    With the huge application, the JavaScript code in the project will become more and more bloated. At this time, many language defects of JavaScript will become more and more obvious. The emergence of typescript is to solve the inherent weakness of JavaScript language: static type. Front end development QQ group: 377786580 This article starts from […]

  • Some new postures of ES6

    Time:2019-12-5

    Original: Javascript ES6 – (Exploring the new built in methods) Object property assignment When dealing with objects, you may need to combine multiple objects, new Object.assign()Functions can do this succinctly. Object merging Our goal is to combine the objects of 2-4 lines into one object. In Es5, you need to loop several objects and assign […]

  • Master the contents of JavaScript Es5 to es8 array at one time

    Time:2019-12-4

    Array methods provided in ECMAScript 5.1 Ecma-262 / 5.1 specification Determine whether it is an array Array.isArray ( arg ) // false or true Browsers such as IE9 – that do not support this method can do the following: Object.prototype.toString.call(obj) === ‘[object Array]’; Transformation method toString ArrayvalueOfWill be called by defaulttoStringMethod, so their return values […]

  • Lexical environments: ECMAScript implementation

    Time:2019-12-3

    original text ECMA-262-5 in detail. Chapter 3.2. Lexical environments: ECMAScript implementation. brief introduction In the previous chapter 3.1. We discussedLexical EnvironmentThe whole theory of. We also discussed the relevantStatic scope(static scope) andclosure(closures)。 We also mentioned that ECMAScript usesChain environment frame model(the model of chained environment frames)。 In this chapter, we will use ECMAScript to implementLexical […]

  • Lexical environments: Common Theory

    Time:2019-12-2

    original text ECMA-262-5 in detail. Chapter 3.1. Lexical environments: Common Theory. brief introduction In this chapter, we will discuss the details of the Lexical Environment – a mechanism that is used by many language applications to manage static scopes. In order to better understand this concept, we will also discuss some other — dynamic scope […]

  • ES6 learning summary (01) (new learners)

    Time:2019-12-2

    Getting started with ecmascript6 / ES6 I. Preface As I am learning ES6 recently, I can be more familiar with taking some notes. Take this opportunity to write a new learning summary about ES6. I hope that the big guy can give some advice, and I hope that new people like me can better and […]

  • ES6 learning summary (02) (for new students)

    Time:2019-11-30

    Getting started with ecmascript6 / ES6 Let and const commands IV. deconstruction and assignment of variables Before ES6, the assignment of array and object attributes can only directly specify fixed values. ES6 allows to extract values from arrays and objects and assign values to variables according to certain patterns, which is called destructing.1. Array deconstruction […]

  • ES6 learning summary (03) (new learners)

    Time:2019-11-29

    Getting started with ecmascript6 / ES6 Let and const commandsDeconstruction and assignment of variables V. string extension Note: there is nothing to understand in this chapter. Just read it once, so I will copy some useful things to you.1. Unicode representation of charactersJavaScript allows\uxxxxForm represents a character, where XXXX represents the Unicode code point of […]