Proposal: Static sort method on Array
robjtede at icloud.com
Sat Apr 7 19:59:58 UTC 2018
I don't like the fact the only way to sort is in-place with Array#sort and I can't be the first to feel this way or wonder why there isn't a built-in solution.
I'm considering creating a proposal to add an Array.sort() method that takes an array and returns a new array. It seems like such a simple addition that would remove the need to import lodash, write a helper function or use a slightly less clear and possibly slower technique like `[...arr].sort()`.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the es-discuss