ES6 Tutorial
ES6 ES6 i About the Tutorial European Computer Manufacturers Association (ECMAScript) or (ES) is a standard for scripting languages like JavaScript, ActionScript simple and practical approach through JavaScript to describe the new features in ECMAScript 2015 (ES6), ECMAScript 2016 (ES7), ECMAScript 2017(ES8) and ECMAScript 2018 (ES9). Audience This tutorial tutorial will give you enough understanding on the functionalities of ECMAScript and also about ES6, ES7, ES8 and ES9. Prerequisites An understanding of JavaScript programming concepts is necessary0 码力 | 435 页 | 4.00 MB | 1 年前3阮一峰 《ECMAScript 6入门》 第三版
新引入的语法特性。 前言 4 本书覆盖 ES6 与上一个版本 ES5 的所有不同之处,对涉及的语法知识给予详细介 绍,并给出大量简洁易懂的示例代码。 本书为中级难度,适合已经掌握 ES5 的读者,用来了解这门语言的最新发展;也 可当作参考手册,查寻新增的语法点。 前言 5 全书已由电子工业出版社出版,2017年9月推出了第三版,书名为《ES6 标准入 门》。纸版是基于网站内容排版印刷的。 0许可证。 只要保持原作者署名和非商用,您可以自由地阅读、分享、修改本书。 详细的法律条文请参见创意共享网站。 前言 6 ECMAScript 6简介 ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在2015 年6月正式发布了。它的目标,是使得 JavaScript 语言可以用来编写复杂的大型应 用程序,成为企业级开发语言。 ECMAScript 和 ActionScript)。日常场合,这两 个词是可以互换的。 ES6 与 ECMAScript 2015 的关系 ECMAScript 2015(简称 ES2015)这个词,也是经常可以看到的。它与 ES6 是什 么关系呢? 2011年,ECMAScript 5.1版发布后,就开始制定6.0版了。因此,ES6 这个词的原 意,就是指 JavaScript 语言的下一个版本。 但0 码力 | 679 页 | 2.66 MB | 1 年前3BabelJS Tutorial
................................................................................ 9 4. BabelJS — ES6 Code Execution ................................................................................... ..................................................................... 27 7. BabelJS — Transpile ES6 features to ES5 .................................................................................. ......... 53 8. BabelJS — Transpile ES6 Modules to ES5 ................................................................................................ 56 ES6 modules and Webpack .................0 码力 | 173 页 | 2.70 MB | 1 年前3ThinkJS 2.0 中文文档
ThinkJS ����� ES6/7 ������� Node.js MVC ����� ES7 � async/await ��� ES6 �� */yield ������� Node.js ���������������������������� ����� Node.js ���������� �� ES6/7 ����������������������������� Node js � ES6 ����� ����������������������� Babel ������ �� Babel ������������� ES6/7 �������������������������� � async/await �� */yield ����������� ThinkJS 2.0 Documentation ���� �� �� �� ES6/7 ������� ������� ���������� ES6 �� class , export , let �� ES7 �� async � await ���� ���������� Session ���������� async/await �������������� � Babel ������������� Node.js ������ ����������������������0 码力 | 238 页 | 1.87 MB | 1 年前3ThinkJS 2.1 Documentation
first Node.js MVC framework that supporting use full ES6/7 features to develop Node.js application. By using async/await in ES7 or */yield in ES6, ThinkJS totally resovled the hard problem of asynchronous efficient than ever before. Using ES6/7 features to build projects is very efficent, that must be the trend. The lastest version of Node.js has supported the features of ES6 more friendly, though not all features. At this time, Babel can help us to compile ES6 code to ES5 code. Babel compile our code to ES5 so we don’t need worry about the browser compatibility. So we can resolve the asynchronous callbacks0 码力 | 148 页 | 1.69 MB | 1 年前3ThinkJS 2.0 Documentation
first Node.js MVC framework that supporting use full ES6/7 features to develop Node.js application. By using async/await in ES7 or */yield in ES6, ThinkJS totally resovled the hard problem of asynchronous efficient than ever before. Using ES6/7 features to build projects is very efficent, that must be the trend. The lastest version of Node.js has supported the features of ES6 more friendly, though not all features. At this time, Babel can help us to compile ES6 code to ES5 code. Babel compile our code to ES5 so we don’t need worry about the browser compatibility. So we can resolve the asynchronous callbacks0 码力 | 141 页 | 1.61 MB | 1 年前3ThinkJS 2.2 Documentation
first Node.js MVC framework that supporting use full ES6/7 features to develop Node.js application. By using async/await in ES7 or */yield in ES6, ThinkJS totally resovled the hard problem of asynchronous efficient than ever before. Using ES6/7 features to build projects is very efficent, that must be the trend. The lastest version of Node.js has supported the features of ES6 more friendly, though not all features. At this time, Babel can help us to compile ES6 code to ES5 code. Babel compile our code to ES5 so we don’t need worry about the browser compatibility. So we can resolve the asynchronous callbacks0 码力 | 156 页 | 2.62 MB | 1 年前3ThinkJS 2.2 中文文档
是一款使用 ES6/7 特性全新开发的 Node.js MVC 框架,使用 ES7 中 async/await ,或者 ES6 中的 */yield 特性彻底解决了 Node.js 中异步嵌套的问题。同时吸收了国内外众多框架的设 计理念和思想,让开发 Node.js 项目更加简单、高效。 使用 ES6/7 特性来开发项目可以大大提高开发效率,是趋势所在。并且新版的 Node.js 对 ES6 特 性也有了较好的支持,即使有些特性还没有支持,也可以借助 Babel 编译来支持。 特性 使用 ES6/7 特性来开发项目 借助 Babel 编译,可以在项目中大胆使用 ES6/7 所有的特性,无需担心哪些特性当前版本不支 持。尤其是使用 async/await 或者 */yield 来解决异步回调的问题。 //user controller, home/controller/user.js Documentation 快速入门 await this.session('userInfo', result); return this.success(); } } 上面的代码我们使用了 ES6 里的 class , export , let 以及 ES7 里的 async/await 等特性,虽然 查询数据库和写入 Session 都是异步操作,但借助 async/await ,代码都是同步书写的。最后0 码力 | 277 页 | 3.61 MB | 1 年前3JavaScript Promise迷你书(中文版)
用 Promise来解决 • 以ES6 Promises为基础进行学习,逐渐发展形成自己的风格 像上面所提到的那样,本书主要是以ES6 Promises,即JavaScript的标准规范为基础 的、Promise的相关知识为主要讲解内容。 在Firefox和Chrome这样技术比较超前的浏览器上,不需要安装额外的插件就能使用 Promise功能,此外ES6 Promises的规范来源于Promises/A+社区,它有很多版本的实 使用promise的理由之一。 接下来,让我们在实践中来学习JavaScript的Promise吧。 JavaScript Promise 迷你书(中文版) 7 Promise简介 在 ES6 Promises 标准中定义的API还不是很多。 目前大致有下面三种类型。 Constructor Promise类似于 XMLHttpRequest ,从构造函数 Promise 来创建一个新建新 onRejected "unresolved" - Pending 既不是resolve也不是reject的状态。也就是promise对象刚被创建后的初始化状态等 关于上面这三种状态的读法,其中 左侧为在 ES6 Promises 规范中定义的术语, 而右侧 则是在 Promises/A+ 中描述状态的术语。 基本上状态在代码中是不会涉及到的,所以名称也无需太在意。 在这本书中,我们会 基于 Promises/A+130 码力 | 112 页 | 1010.02 KB | 1 年前3TypeScript Handbook(中文版)
tsconfig.json 现在安装好了 Angular 2 及其依赖项, 我们还需要启用 TypeScript 中实验性的装饰 器支持并且引入 es6-shim 的类型文件。 将来的版本中,装饰器和 ES6 选项将成为 默认选项,我们就可以不做此设置了。 添加 "experimentalDecorators": true, "emitDecoratorMetadata": true 选项到 "compilerOptions" 和Uglify一样,Babelify也会混淆代 码,因此我们也需要vinyl-buffer和gulp-sourcemaps。 默认情况下Babelify只会处理 扩展名为 .js , .es , .es6 和 .jsx 的文件,因此我们需要添加 .ts 扩展名 到Babelify选项。 npm install --save-dev babelify babel-preset-es2015 vinyl-buffer --downlevelIteration 编译选项 TypeScript Handbook(中文版) 107 TypeScript 2.3 之前迭代器只在编译目标为 ES6/ES2015 或者更新版本时可用。此外,设计迭代器 协议的结构,比如 for..of ,如果编译目标低于ES6/ES2015,则只能在操作数 组时被支持。 TypeScript 2.3 在 ES3 和 ES5 为编译目标时由 --downlevelIteration0 码力 | 557 页 | 7.48 MB | 1 年前3
共 98 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10