cafe-utility 17.3.0 → 17.3.1
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/index.js +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1146,9 +1146,11 @@ function selectMax(n, t) {
|
|
|
1146
1146
|
return e ? [e, n[e]] : null
|
|
1147
1147
|
}
|
|
1148
1148
|
function reposition(n, t, e, r) {
|
|
1149
|
-
const o = n.find(
|
|
1150
|
-
|
|
1151
|
-
|
|
1149
|
+
const o = n.find(s => s[t] === e),
|
|
1150
|
+
i = n.find(s => s[t] === e + r)
|
|
1151
|
+
o && i ? ((o[t] = e + r), (i[t] = e)) : o && (o[t] = e + r),
|
|
1152
|
+
n.sort((s, c) => asNumber(s[t]) - asNumber(c[t])),
|
|
1153
|
+
n.forEach((s, c) => (s[t] = c + 1))
|
|
1152
1154
|
}
|
|
1153
1155
|
function buildUrl(n, t, e) {
|
|
1154
1156
|
return joinUrl(n, t) + toQueryString(e || {})
|