steamutils 1.5.9 → 1.5.10
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/utils.js +9 -0
package/package.json
CHANGED
package/utils.js
CHANGED
@@ -1139,3 +1139,12 @@ export async function getImageSize(url) {
|
|
1139
1139
|
export function getGreetMessage() {
|
1140
1140
|
return _.sample(["nha", "nhá", "nhé"]);
|
1141
1141
|
}
|
1142
|
+
|
1143
|
+
export function logNow(...msg) {
|
1144
|
+
const date = new Date();
|
1145
|
+
const fmt = (n) => n.toString().padStart(2, "0");
|
1146
|
+
const offset = 7 * 60;
|
1147
|
+
const localDate = new Date(date.getTime() + offset * 60 * 1000);
|
1148
|
+
const formattedDate = `${fmt(localDate.getUTCDate())}/${fmt(localDate.getUTCMonth() + 1)}/${localDate.getUTCFullYear()} ${fmt(localDate.getUTCHours())}:${fmt(localDate.getUTCMinutes())}:${fmt(localDate.getUTCSeconds())}`;
|
1149
|
+
console.log(`[${formattedDate}]`, ...msg);
|
1150
|
+
}
|