magtool 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/dist/util.js +6 -6
  2. package/package.json +1 -1
package/dist/util.js CHANGED
@@ -47,13 +47,13 @@ const M = (i) => {
47
47
  }, t = 2) => {
48
48
  let o = null;
49
49
  return new Promise((r, n) => {
50
- o = setTimeout(() => {
51
- e(r, n), clearTimeout(o), r(!0);
50
+ o = setTimeout(async () => {
51
+ await e(r, n), await clearTimeout(o), await r(!0);
52
52
  }, t * 100);
53
53
  });
54
54
  };
55
55
  window.$pm = d, window.$promise = d;
56
- const p = (e = () => {
56
+ const w = (e = () => {
57
57
  }, t = 500) => {
58
58
  let o;
59
59
  return function(...r) {
@@ -62,7 +62,7 @@ const M = (i) => {
62
62
  }, t);
63
63
  };
64
64
  };
65
- window.$db = p, window.$debounce = p, Number.prototype.toFixedNumber = function(e) {
65
+ window.$db = w, window.$debounce = w, Number.prototype.toFixedNumber = function(e) {
66
66
  return Number(this.toFixed(e));
67
67
  }, Array.prototype.filter1 = function(e) {
68
68
  if (!e || typeof e != "function")
@@ -78,7 +78,7 @@ const M = (i) => {
78
78
  data: t
79
79
  };
80
80
  }, window.$getType = (e) => Object.prototype.toString.call(e).slice(8, -1);
81
- const w = (e, t) => {
81
+ const p = (e, t) => {
82
82
  if (!e) {
83
83
  console.info("No Value");
84
84
  return;
@@ -104,7 +104,7 @@ const M = (i) => {
104
104
  });
105
105
  }
106
106
  };
107
- window.$copy = w, i.config.globalProperties.$copy = w;
107
+ window.$copy = p, i.config.globalProperties.$copy = p;
108
108
  const h = (e) => e < 1e3 ? e : e < 1e6 ? parseInt(e / 1e3) + "K" : parseInt(e / 1e6) + "M";
109
109
  window.$sc = h;
110
110
  const F = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "magtool",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.0.5",
4
+ "version": "1.0.6",
5
5
  "author": "magxl",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",