JS: ECMAScript 2018
Destructure object rest properties
// destructure object with rest keys let { bb, ...keyrest } = { aa: "a", bb: "b", cc: "c" }; console.log(bb === "b"); // true console.log(JSON.stringify(keyrest) === `{"aa":"a","cc":"c"}`); // true
Spread operator for object literal
const xx = { ...{ a: 1, b: 2 }, c: 3 }; console.log(JSON.stringify(xx) === `{"a":1,"b":2,"c":3}`);
Regex Features
RegExp.prototype.dotAll
,s
, make the dot.
also match newline characters.- JS: RegExp Flag#flag_dotAll_646
- Match characters by Unicode character property:
\p{PropertyValue}
and\P{PropertyValue}
. - JS: RegExp Unicode Property
- Named capture group.
- JS: RegExp Syntax#regex_syn_882
- lookbehind assertions.
- JS: RegExp Syntax#regex_syn_417
async iteration
xtodosupport for asynchronous iteration via the AsyncIterator protocol and async generators.
promise finally
xtodoPromise.prototype.finally