core&utils: remove outdated code

This commit is contained in:
undefined committed 2022-08-24 14:35:45 +08:00
1 parent 5ae8258b8a
commit 7903d012da
23 files changed
+61 -144

No files matched your search

+5
View File
@@ -1,3 +1,4 @@
import crypto from 'crypto';
import os from 'os';
import path from 'path';
import { Duplex } from 'stream';
@@ -7,6 +8,10 @@ import type { Moment } from 'moment-timezone';
import { isMoment } from 'moment-timezone';
import { ObjectID } from 'mongodb';
const encrypt = (algorithm, content) => crypto.createHash(algorithm).update(content).digest('hex');
export const sha1 = (content: string) => encrypt('sha1', content);
export const md5 = (content: string) => encrypt('md5', content);
export function folderSize(folderPath: string) {
// eslint-disable-next-line @typescript-eslint/no-shadow
let size = 0;