@tb-dev/utils 1.7.1 → 1.7.3
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/promise.cjs +2 -1
- package/dist/promise.js +2 -1
- package/package.json +3 -3
package/dist/promise.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const scheduler = typeof setImmediate === "function" ? setImmediate : setTimeout;
|
|
3
4
|
function flush() {
|
|
4
|
-
return new Promise((resolve) => void
|
|
5
|
+
return new Promise((resolve) => void scheduler(resolve, 0));
|
|
5
6
|
}
|
|
6
7
|
function sleep(ms) {
|
|
7
8
|
return new Promise((resolve) => void setTimeout(resolve, ms));
|
package/dist/promise.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
const scheduler = typeof setImmediate === "function" ? setImmediate : setTimeout;
|
|
1
2
|
function flush() {
|
|
2
|
-
return new Promise((resolve) => void
|
|
3
|
+
return new Promise((resolve) => void scheduler(resolve, 0));
|
|
3
4
|
}
|
|
4
5
|
function sleep(ms) {
|
|
5
6
|
return new Promise((resolve) => void setTimeout(resolve, ms));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/utils",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"description": "TypeScript utils",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"*.{?(c|m)@(j|t)s,vue}": "pnpm run lint"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tb-dev/utility-types": "^1.
|
|
30
|
+
"@tb-dev/utility-types": "^1.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@tb-dev/eslint-config": "^3.5.1",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"format": "prettier . --write",
|
|
88
88
|
"format-check": "prettier . --check",
|
|
89
89
|
"lint": "eslint . --config eslint.config.js --cache",
|
|
90
|
-
"lint-fix": "eslint . --config eslint.config.js --
|
|
90
|
+
"lint-fix": "eslint . --config eslint.config.js --fix",
|
|
91
91
|
"release": "pnpm run build && pnpm publish",
|
|
92
92
|
"type-check": "tsc --noEmit",
|
|
93
93
|
"update": "miho update major -t"
|