In reply to Mastodon post
There are new Array APIs that don’t mutate!
`toReversed`
`toSorted`
`toSpliced`
`with`
(already in Safari 16 and Node 20+)
9 replies
There are new Set methods coming for `intersection`, `difference`, `isSubsetOf`, `union`!
Not yet available anywhere yet but I am so ready for these 🏆
ShadowRealm for sandboxed JavaScript execution will be very helpful in WebC too 👍🏻
@zachleat Oh that's super nice.
@zachleat toSorta feels like they should have dummies of the existing non-mutating ones, for "consistency”. e.g. toSlice(), toConcat(), etc.
@erikras seems logical to me!
@zachleat .with() is by far the greatest DX upgrade of that gang.
Also this is in Cr/Edge 110+, Fx 115+, Deno too. All modern browsers have it.