@ntnyq/utils 0.11.3 → 0.11.5
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/dist/index.js +2 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -351,7 +351,8 @@ function cAF(id) {
|
|
|
351
351
|
* @returns the new value
|
|
352
352
|
*/
|
|
353
353
|
function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFINITY) {
|
|
354
|
-
|
|
354
|
+
const [low, high] = [Math.min(min, max), Math.max(min, max)];
|
|
355
|
+
return Math.min(Math.max(value, low), high);
|
|
355
356
|
}
|
|
356
357
|
//#endregion
|
|
357
358
|
//#region src/misc/waitFor.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/utils",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
4
4
|
"description": "Common used utils.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utils"
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@ntnyq/tsconfig": "^3.1.0",
|
|
34
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
34
|
+
"@typescript/native-preview": "^7.0.0-dev.20260401.1",
|
|
35
35
|
"bumpp": "^11.0.1",
|
|
36
36
|
"husky": "^9.1.7",
|
|
37
37
|
"nano-staged": "^0.9.0",
|
|
38
38
|
"npm-run-all2": "^8.0.4",
|
|
39
|
-
"oxfmt": "^0.
|
|
40
|
-
"oxlint": "^1.
|
|
39
|
+
"oxfmt": "^0.43.0",
|
|
40
|
+
"oxlint": "^1.58.0",
|
|
41
41
|
"tsdown": "^0.21.7",
|
|
42
42
|
"vitest": "^4.1.2"
|
|
43
43
|
},
|