New JavaScript features in ES2019:
Array#{flat,flatMap}
Object.fromEntries
String#{trimStart,trimEnd}
Symbol#description
try { } catch {} // optional binding
JSON ⊂ ECMAScript
well-formed JSON.stringify
stable Array#sort
revised Function#toString
-
Show this thread
-
Replying to @mathias @leobalter
Wasn't Array#sort already stable? I thought it was a v8 issue rather than the spec itself
1 reply 0 retweets 0 likes
Replying to @hurricanecart @leobalter
Mathias Bynens Retweeted Mathias Bynens
It wasn’t stable in V8 and Chakra in some cases, and the spec previously didn’t require stability. Now all engines have a stable sort, and the spec requires stability. More info in the demo link here:https://twitter.com/mathias/status/1036626116654637057 …
Mathias Bynens added,
Mathias BynensVerified account @mathias
Array.prototype.sort is now stable in @v8js v7.0 / Chrome 70!
Previously, V8 used an unstable QuickSort for arrays with more than 10 elements. Now, we use the stable TimSort algorithm.
Demo: https://mathiasbynens.be/demo/sort-stability … pic.twitter.com/zrynE48Vcp
Previously, V8 used an unstable QuickSort for arrays with more than 10 elements. Now, we use the stable TimSort algorithm.
Demo: https://mathiasbynens.be/demo/sort-stability … pic.twitter.com/zrynE48Vcp
Show this thread
8:11 AM - 30 Jan 2019
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.