admin stuff
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import crypto from "crypto";
|
||||
|
||||
const epochs = [
|
||||
["year", 31536000],
|
||||
["month", 2592000],
|
||||
@@ -27,4 +29,7 @@ export default new class {
|
||||
const { interval, epoch } = getDuration(~~((new Date() - new Date(date)) / 1e3));
|
||||
return `${interval} ${epoch}${interval === 1 ? "" : "s"} ago`;
|
||||
}
|
||||
md5(str) {
|
||||
return crypto.createHash('md5').update(str).digest("hex");
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user