@node-mf/tools 0.0.0
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.
Potentially problematic release.
This version of @node-mf/tools might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/disk-size.js +91 -0
- package/duration.js +61 -0
- package/index.js +1 -0
- package/package.json +13 -0
- package/performance.js +33 -0
- package/readable.js +7 -0
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@node-mf/tools",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "component tools mf",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"license": "Trinity Optima Production",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@supabase/supabase-js": "2.106.1",
|
|
9
|
+
"mongoose": "6.2.1",
|
|
10
|
+
"profile-picture": "npm:jimp@0.16.2",
|
|
11
|
+
"pg": "8.21.0"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/performance.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
|
|
3
|
+
|
|
4
|
+
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
|
|
5
|
+
module.exports = function() {
|
|
6
|
+
return performance.now();
|
|
7
|
+
};
|
|
8
|
+
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
|
|
9
|
+
module.exports = function() {
|
|
10
|
+
return (getNanoSeconds() - nodeLoadTime) / 1e6;
|
|
11
|
+
};
|
|
12
|
+
hrtime = process.hrtime;
|
|
13
|
+
getNanoSeconds = function() {
|
|
14
|
+
var hr;
|
|
15
|
+
hr = hrtime();
|
|
16
|
+
return hr[0] * 1e9 + hr[1];
|
|
17
|
+
};
|
|
18
|
+
moduleLoadTime = getNanoSeconds();
|
|
19
|
+
upTime = process.uptime() * 1e9;
|
|
20
|
+
nodeLoadTime = moduleLoadTime - upTime;
|
|
21
|
+
} else if (Date.now) {
|
|
22
|
+
module.exports = function() {
|
|
23
|
+
return Date.now() - loadTime;
|
|
24
|
+
};
|
|
25
|
+
loadTime = Date.now();
|
|
26
|
+
} else {
|
|
27
|
+
module.exports = function() {
|
|
28
|
+
return new Date().getTime() - loadTime;
|
|
29
|
+
};
|
|
30
|
+
loadTime = new Date().getTime();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}).call(this);
|
package/readable.js
ADDED