necessary 17.0.4 → 17.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -944,13 +944,13 @@ patch([1, 2, 0, -1, -2], 4, (element, index) => (element === 0)); // the array a
|
|
|
944
944
|
* The `compress()` function will remove elements from the array argument whenever the callback function returns a falsey value:
|
|
945
945
|
|
|
946
946
|
```
|
|
947
|
-
compress([1, 2, 1], (element1, element2) => (element1
|
|
947
|
+
compress([1, 2, 1], (element1, element2) => (element1 !== element2)); // the array argument becomes [1, 2]
|
|
948
948
|
```
|
|
949
949
|
|
|
950
950
|
* The `combine()` function will concatenate the two array arguments, compress them and and return the result:
|
|
951
951
|
|
|
952
952
|
```
|
|
953
|
-
combine([1, 2, 1], [2, 3], (element1, element2) => (element1
|
|
953
|
+
combine([1, 2, 1], [2, 3], (element1, element2) => (element1 !== element2)); // returns [1, 2, 3]
|
|
954
954
|
```
|
|
955
955
|
|
|
956
956
|
* The `reverse()` function returns the array argument reversed, as opposed to its native counterpart which reverses an array in place:
|