[TOC]
> http://exploringjs.com/es2018-es2019/toc.html
# 關于本書
主要包含內容:
- ECMAScript 2018
- ECMAScript 2019
該書僅包含這些內容,如果要查看其他內容,請到這里:http://exploringjs.com/ 查看我的其他書籍。
<h3 style="background-color: #FFFF66;border-bottom: thin solid lightgray;">本書尚未完成</h3>
“探索 ES2018 和 ES2019”是一本還在持續更新的書。更多內容仍有待發布:
- ES2018:ES2018 的相關特性已經完成,本書中進行了描述。
- ES2019:正在進行中。我在[博文](http://2ality.com/2018/02/ecmascript-2019.html)中跟蹤未來可能出現的一些特性。確認 ES2019 的特性后,本書會對其進行說明講解。
現在購買這本書,免費獲得未來所有的更新!
## ECMASCRIPT 2018
### Asynchronous iteration
Asynchronous iteration
`for-await-of`
Asynchronous generators
Examples
WHATWG Streams are async iterables
The specification of asynchronous iteration
Alternatives to async iteration
Further reading
### Rest/Spread Properties
The rest operator (`...`) in object destructuring
The spread operator (`...`) in object literals
Common use cases for the object spread operator
Spreading objects versus Object.assign()
### RegExp named capture groups
Numbered capture groups
Named capture groups
Backreferences
`replace()` and named capture groups
Named groups that don’t match
Implementations
Further reading
### RegExp Unicode property escapes
Overview
Unicode character properties
Unicode property escapes for regular expressions
Examples
Trying it out
Further reading
### RegExp lookbehind assertions
Lookahead assertions
Lookbehind assertions
Conclusions
Further reading
### `s` (dotAll) flag for regular expressions
Overview
Limitations of the dot (`.`) in regular expressions
The proposal
FAQ
### Promise.prototype.finally()
How does it work?
Use case
`.finally()` is similar to `finally {}` in synchronous code
Availability
Further reading
### Template Literal Revision
Tag functions and escape sequences
Problem: some text is illegal after backslashes
Solution
III。ECMAScript 2019.
13\. array.prototype。{flat,flatmap}
13.1。概述
13.2。有關.flatmap()的更多信息
13.3。用例:同時過濾和映射
13.4。用例:映射到多個值
13.5。其他版本的.flatmap()
13.6。有關.flat()的更多信息
13.7。常問問題
13.8。進一步閱讀
14\. object.fromentries()
14.1。object.fromentries()vs. object.entries()
14.2。例子
14.3。一個實施
14.4。有關Object.fromentries()的更多詳細信息
15\. string.prototype。{trimstart,trimend}
15.1。字符串方法.trimstart()和.trimend()
15.2。遺留字符串方法:.trimleft()和.trimright()
15.3。什么人稱計數為空格?
16.符號.prototype.description.
17.可選的捕獲約束力
17.1。概述
17.2。用例
17.3。進一步閱讀
18.穩定的array.prototype.sort()
19.成熟的json.stringify
20\. JSON超牌
21\. function.prototype.tostring修訂版
21.1。算法