ECMAScript 提案
大约 2 分钟
ECMAScript 提案
索引
Finished
Finished (stage 4) 提案已经在 Core-JS 中标记为稳定的 ECMAScript,可以在core-js/stable和core-js/es命名空间中找到(参见相关部分的文档)。但 Core-JS 仍旧提供了一种只引入特定提案的功能的方法,如core-js/proposals/proposal-name
globalThis
ES 相关的索引方法
Array.prototype.includes
Array.prototype.flat / Array.prototype.flatMap
从最后开始查找 Array
通过复制来改变 Array
Object.values / Object.entries
Object.fromEntries
Object.getOwnPropertyDescriptors
可访问的 Object.prototype.hasOwnProperty
String 填充
String.prototype.matchAll
String.prototype.replaceAll
String.prototype.trimStart / String.prototype.trimEnd
RegExp s (dotAll) 标记
RegExp 命名捕获组
Promise.allSettled
Promise.any
Promise.prototype.finally
用于异步迭代的 Symbol.asyncIterator
Symbol.prototype.description
Well-formed JSON.stringify
结构良好的 unicode 字符串
Stage 3
core-js/stage/3 只包含 Stage 3 的提案,而core-js/stage/2则包含 Stage 2 到 Stage 3 的提案,以此类推……
入口点:
core-js(-pure)/stage/3
Iterator helper 函数
Array.fromAsync
ArrayBuffer.prototype.transfer 和相关的
新的 Set 方法
JSON.parse 源文本访问
显式资源管理
装饰器元数据的 Symbol.metadata 提案
Stage 2
入口点:
core-js(-pure)/stage/2
Array 分组
AsyncIterator helper 函数
Iterator.range
Promise.withResolvers
Map.prototype.emplace
Array.isTemplateObject
String.dedent
异步显式资源管理
Symbol 断言
Stage 1
入口点:
core-js(-pure)/stage/1
Observable
新的集合方法
集合构造器的 .of 和 .from 方法
compositeKey 和 compositeSymbol
Array 过滤器
Array 去重
从最后开始查找 Array
Number.fromString
Math 拓展
Math.signbit
String.cooked
String.prototype.codePoints
用于模式匹配的 Symbol.matcher
Stage 0
入口点:
core-js(-pure)/stage/0
Function.prototype.demethodize
Function.{ isCallable, isConstructor }
URL
Pre-stage 0
入口点:
core-js(-pure)/stage/pre