mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
## About The Pull Request This PR has no player-facing changes. Closes #83161 Replaces several `collection.ts` functions with functions from the `es-toolkit` package. ### Migration <table> <tr> <th width="100px">Function</th> <th>Notes</th> </tr> <tr> <td> `filter` </td> <td rowspan="3"> Replace `common/collections` import with `es-toolkit/compat` </td> </tr> <tr> <td> `map` </td> </tr> <tr> <td> `reduce` </td> </tr> <tr> <td> `uniqBy` </td> <td rowspan="5"> Replace `common/collections` import with `es-toolkit` </td> </tr> <tr> <td> `uniq` </td> </tr> <tr> <td> `zip` </td> </tr> <tr> <td> `range` </td> </tr> <tr> <td> `sortBy` </td> </tr> <tr> <td> `paginate` </td> <td> Replace with `chunk` from `es-toolkit` </td> </tr> <tr> <td> `deepMerge` </td> <td> Replace with `toMerged` from `es-toolkit` </td> </tr> <tr> <td> `sort` </td> <td> This function is broken because it leaves the input array unchanged. Replace with es-toolkit's `sortBy` or the native `Array.prototype.sort` depending on context </td> </tr> </table> ## Why It's Good For The Game Reduced maintenance costs --------- Co-authored-by: Arthri <41360489+a@users.noreply.github.com>
9 lines
110 B
JSON
9 lines
110 B
JSON
{
|
|
"name": "common",
|
|
"version": "4.3.1",
|
|
"dependencies": {
|
|
"es-toolkit": "^1.39.3"
|
|
},
|
|
"private": true
|
|
}
|