在上篇Angular遇上CoffeeScript – NgComponent封装中,我们讲述了CoffeeScript这门小巧的语言,摒弃JavaScript中糟粕(“坑”)部分,并将JavaScript中精粹部分发挥到淋淋尽致。虽然笔者更喜欢ES6 + Babel或者TypeScript这类鲜明特...
分类:
编程语言 时间:
2015-09-22 09:58:46
阅读次数:
144
SnandyStop, thinking is the essence of progress.ES6块级作用域及新变量声明(let)很多语言中都有块级作用域,但JS没有,它使用var声明变量,以function来划分作用域,大括号“{}” 却限定不了var的作用域。用var声明的变量具有变量提升(...
分类:
其他好文 时间:
2015-09-15 09:20:21
阅读次数:
240
Webpack是前端一个工具,可以让各个模块进行加载,预处理,再进行打包,它能有Grunt或Gulp所有基本功能。优点如下: 1.支持commonJS和AMD模块。 2.支持很多模块加载器的调用,可以使模块加载器灵活定制,比如babel-loader加载器,该加载器能使我们使用ES6的语法来编写代码...
分类:
Web程序 时间:
2015-09-08 23:27:33
阅读次数:
426
Install:npm install --save-dev babel-loaderwebpack.config.js:Add module, tell webpack to find all js file and use babel as loader, exclude all files i...
分类:
Web程序 时间:
2015-09-08 16:43:22
阅读次数:
461
You can easily spend hours configuring the perfect dev environment with all the latest hotness like ES6 (and beyond) support, hot reloading, and a myr...
分类:
Web程序 时间:
2015-09-06 06:23:09
阅读次数:
509
最近在跟着阮一峰的es6系列文章学习es6,在let和const命令这一章中,发现了一些错误,特列出一、let不存在变量提升假设let不存在变量提升,那么在阮一峰的文章中的这段代码代码是正确的function do_something() { console.log(foo); // Refere....
分类:
其他好文 时间:
2015-09-04 12:33:29
阅读次数:
472
ThinkJS是一款高效、简单易用的Node.js MVC框架。该框架借鉴了很多?ThinkPHP?的特性,同时结合Node.js的特性,使用了?ES6 Promise,让异步编程更加简单、方便。 目前打算使用ThinkJS来开发APP后端服务。 Thin...
分类:
Web程序 时间:
2015-09-02 10:51:15
阅读次数:
266
ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through settin...
分类:
Web程序 时间:
2015-08-31 17:02:34
阅读次数:
187
Reflect:基础:let Class = class {};Reflect.construct(Class) instanceof Class // truelet obj = {x: 23};Reflect.get(obj, 'x') // 23Reflect.has(obj, 'x') //...
分类:
其他好文 时间:
2015-08-30 20:56:10
阅读次数:
354
Map:初始化:const mapSize = (new Map()).size; //mapSize: 0const pair1 = [1, 'one']; const pair2 = [2, 'two'];const map = new Map([pair1, pair2]); //new...
分类:
其他好文 时间:
2015-08-30 15:37:31
阅读次数:
171