mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&utils: remove outdated code
This commit is contained in:
1 parent
5ae8258b8a
commit
7903d012da
23 files changed
+61
-144
No files matched your search
@@ -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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.3.5",
|
||||
"version": "1.3.6",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user