You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,28 @@
2
2
3
3
## main
4
4
5
+
## Next version
6
+
7
+
### API changes
8
+
9
+
-`Array` mutable & immutable helper name changed to conform to JS' upcoming APIs [such as `toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted)
**Note 1**: These changes should all produce the correct type errors. Though `TypedArray`'s `reverse` and `sort` previously mutated _and_ returned the mutated array itself, whereas now they'd be copies. Please be careful refactoring these 2.
24
+
25
+
**Note 2**: the newly added helpers, `Array.toSorted`, `Array.toSpliced`, `Array.toReversed`, `Array.with`, `TypedArray.toSorted` and `TypedArray.toReversed` require their respective polyfill, as [they're not currently supported by Firefox](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted).
Copy file name to clipboardExpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ This standard library is based on `rescript-js`, but with the tweaks and modific
111
111
-`setUnsafe` added (copied from `Belt`).
112
112
-`sort`, `toSorted`, `reverse`, `toReversed`, `splice`, `toSpliced` are the same as their JS counterpart (mutable and immutable, respectively).
113
113
-`keepMap` is added from `Belt`, but **renamed to `filterMap`**. Rationale: `filterMap` is closer to the JS convention of naming. It's also available in other languages like Rust. `keep` et al can confuse beginners, who're bound to be looking for `filter` style names since that's what JS has.
114
-
-`shuffle` and `shuffleInPlace` are added (copied from `Belt`).
114
+
-`shuffle` and `toShuffled` are added (copied from `Belt`'s `shuffleInPlace` and `shuffle`).
115
115
-`flatMap` added (copied from `Belt`, but using native `map` and `concat` functions).
0 commit comments