JS: ECMAScript 2018
Assignment pattern for object rest properties
// assignment pattern for object with rest keys let { cat, ...rrr } = { dog: 17, cat: 6, bird: 4 }; console.log(cat); // 6 console.log(rrr); // { dog: 17, bird: 4 }
Spread operator for object literal
const xx = { ...{ dog: 1, cat: 2 }, bird: 3 }; console.log(xx); // { dog: 1, cat: 2, bird: 3 }
Regex features
RegExp.prototype.dotAll,s, make the dot.also match newline characters.- JS: Regular Expression Flags
- Named capture group.
- Lookbehind assertions.
- JS: Regular Expression Syntax
- Match characters by Unicode character property:
\p{PropertyValue}and\P{PropertyValue}. - JS: Regex Unicode Property
Async iteration
xtodosupport for asynchronous iteration via the AsyncIterator protocol and async generators.
Promise finally
xtodoPromise.prototype.finally