Skip to content

Conversation

@Pimm
Copy link
Contributor

@Pimm Pimm commented Aug 1, 2019

According to the current ECMAScript spec (and since version 10), Array.prototype.sort must be stable.

It seems sorting has been stable in Firefox since version 3 (bugzilla). I assume this means it has been in Firefox for Android since its birth.

Sorting is currently stable in V8, and according to v8.dev it has landed in Chrome 70 and Node.js 12. However, it seems Node.js 11 includes V8 7.0 (changelog of Node.js). So it might have landed as early as Node.js 11.

Sorting is currently stable in Chakra Core (PR #5724 in ChakraCore), but I can't find in which version of Edge this landed.

According to a post on StackOverflow, sorting has been stable in Opera since 10, Safari since 4, and IE since 6, but I have no other sources to back up these claims.

@Elchi3 Elchi3 added the data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript label Aug 1, 2019
@ddbeck ddbeck self-requested a review August 2, 2019 09:25
Pimm added 3 commits August 5, 2019 13:45
According to the current ECMAScript spec (and since version 10), sorting must be stable.
See 4b00797. This commit can be squashed if merged.
See 4b00797. This commit can be squashed if merged.
Copy link
Contributor

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Pimm and welcome to BCD! Thank you for opening this PR. I looked into this a little bit and had two suggestions before we merge. Thanks again!

It appears Edge support is right around the corner. We can change Edge's version when it lands.

See 4b00797. This commit can be squashed if merged.
Copy link
Contributor

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you! 🎉

@ddbeck ddbeck merged commit 9095410 into mdn:master Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants