nuxt-hs-ui 2.0.17 → 2.0.18
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/module.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const convertms = (i) => {
|
|
2
|
+
const a = String(i).split(".");
|
|
3
|
+
if (a.length !== 2) {
|
|
4
|
+
return i + ".000";
|
|
5
|
+
} else {
|
|
6
|
+
let ret = a[0];
|
|
7
|
+
ret += ".";
|
|
8
|
+
if (a[1].length === 1) {
|
|
9
|
+
return ret + a[1] + "00";
|
|
10
|
+
} else if (a[1].length === 2) {
|
|
11
|
+
return ret + a[1] + "0";
|
|
12
|
+
} else if (a[1].length === 3) {
|
|
13
|
+
return ret + a[1];
|
|
14
|
+
} else {
|
|
15
|
+
return ret + a[1].slice(-3);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export class StopWatch {
|
|
20
|
+
hrstart;
|
|
21
|
+
constructor() {
|
|
22
|
+
this.hrstart = process.hrtime();
|
|
23
|
+
}
|
|
24
|
+
GetTime = () => {
|
|
25
|
+
const hrend = process.hrtime(this.hrstart);
|
|
26
|
+
const time = convertms(Math.floor(hrend[1] / 1e6 * 1e3) / 1e3);
|
|
27
|
+
return ("___" + hrend[0] + "s").slice(-4) + "" + ("_________" + time).slice(-8);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export const SetTime = () => {
|
|
31
|
+
return process.hrtime();
|
|
32
|
+
};
|
|
33
|
+
export const GetTime = (start) => {
|
|
34
|
+
const hrend = process.hrtime(start);
|
|
35
|
+
const time = convertms(Math.floor(hrend[1] / 1e6 * 1e3) / 1e3);
|
|
36
|
+
return ("___" + hrend[0] + "s").slice(-4) + "" + ("_________" + time).slice(-8);
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-hs-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "My new Nuxt module",
|
|
5
5
|
"repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,6 +65,11 @@
|
|
|
65
65
|
"import": "./dist/runtime/utils/select-item.js",
|
|
66
66
|
"require": "./dist/runtime/utils/select-item.js"
|
|
67
67
|
},
|
|
68
|
+
"./utils/stop-watch": {
|
|
69
|
+
"types": "./dist/runtime/utils/stop-watch.d.ts",
|
|
70
|
+
"import": "./dist/runtime/utils/stop-watch.js",
|
|
71
|
+
"require": "./dist/runtime/utils/stop-watch.js"
|
|
72
|
+
},
|
|
68
73
|
"./utils/string": {
|
|
69
74
|
"types": "./dist/runtime/utils/string.d.ts",
|
|
70
75
|
"import": "./dist/runtime/utils/string.js",
|