Simple and powerful assertion library power assert

power-assertWhat is power assertAnswer in official termsIt is the implementation of the concept of "Power Assert" in JavaScript.Descriptive assertion messages are provided through the standard assertion interface.No API is the best API. With power assert, you don't need to learn many assertion library APIs (in most cases, all you need ...

Posted by aldernon on Sat, 05 Mar 2022 15:42:17 +0100

Study notes - ES2015--22-03-05 (Symbol,for...of...,Iterator,generator,getter setter,ES2016,ES2017)

1.Symbol Symbol is a new basic type; The main function is to define unique attribute names. This feature can also be used to protect private variables. Because the outside world cannot generate the same symbol, it cannot be accessed; If you want to reuse this symbol, you can use the static method symbol for(value: string); The Global Registr ...

Posted by Meissa on Sat, 05 Mar 2022 10:54:29 +0100

js array and object

array What is an array? The index starts from 0, and the collection composed of the same data type is called array. Why do you need arrays (what problems do arrays solve)? For the unified management of the same type of data. What are the characteristics of arrays? Index value;The elements in the array are of the same data type;It is order ...

Posted by Zay on Sat, 05 Mar 2022 08:49:42 +0100

Wind farm visualization: painting particles

Introductionunderstand Wind field data Then go to see how to paint particles.Source library: webgl-windOriginMy GitHubDraw map particlesCheck the source library and find that there is a single Canvas drawing map to obtain the world map coastline coordinates. The main formats are as follows:{ "type": "FeatureCollection", "features": [ { ...

Posted by Sfoot on Sat, 05 Mar 2022 06:51:11 +0100

Vue projects are rendered using SSR servers

Note: This is an article used by the author to record his own learning of SSR and sort out the process of server rendering of a project. This article is only the understanding of the reader according to the demo. If you want to learn how to deploy SSR through this article, the author suggests you consult other more authoritative materials for l ...

Posted by MelbourneFL on Sat, 05 Mar 2022 03:29:15 +0100

Use Baidu ueeditor rich text editor in django project

Get ueeditor Download UEditor source code from the official website. There is no UEditor in the downloaded source code all. JS file. You need to use grunt to package the source package into a deployment Version (including ueditor.all.js file) Install node jsGlobal install grunt (NPM install - G grunt CLI)The command line switches the director ...

Posted by jami3 on Fri, 04 Mar 2022 22:50:34 +0100

Card assembly packaging

1. Implementation process of component library 1.1 component: Reusable Vue instances 1.2 Vue component library: a third-party UI Library Based on vue and independent of business, such as element and ant design 2. Implement your own component library 2.1 scaffold generation vue project 2.2 revised project catalogue 2.2.1 m ...

Posted by Brakanjan on Fri, 04 Mar 2022 20:12:15 +0100

[TypeScript notes] basic type, interface, function and generic type

1, Foundation type Boolean value let isDone: boolean = false number All numbers in TypeScript are floating point numbers. It supports decimal and hexadecimal literals, as well as binary and octal literals in ES 2015. let count: number = 10 character string let name: string = 'lyb' array Writing method 1: Element type []: let list: numb ...

Posted by Komodo on Fri, 04 Mar 2022 18:26:27 +0100

Petite Vue source code analysis - start from the static view

Introduction to code base structureExamples various usage examplesScripts packaging and publishing scriptstests test casessrcImplementation of built-in instructions such as directives v-ifapp.ts createApp functionblock.ts block objectcontext.ts context objecteval.ts provides expression operation functions such as v-if="count === 1"sch ...

Posted by mithu_sree on Fri, 04 Mar 2022 17:44:24 +0100

vue page refresh, data loss, data reset, data cache, data cache, vuex cache

Page refresh data lost In vue, data, vuex store and other data are in memory. Once the page is refreshed, these data will be lost (or reset to the initial value), which will affect the user experience at some times. Cache, recovery If you want to make the data refresh not lost, you have to listen to the page refresh event, cache the data to ...

Posted by jarriola on Fri, 04 Mar 2022 13:03:15 +0100