Files
cf32e76fd9 Replace most collections.ts functions with es-toolkit functions (#91471)
## 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>
2025-07-04 16:41:49 -04:00

9 lines
110 B
JSON

{
"name": "common",
"version": "4.3.1",
"dependencies": {
"es-toolkit": "^1.39.3"
},
"private": true
}