mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: add nyc coverage test
This commit is contained in:
1 parent
7903d012da
commit
b48dc5344a
5 files changed
+7
-10
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import crypto from 'crypto';
|
||||
import { EventEmitter } from 'events';
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
@@ -16,14 +15,6 @@ export function parseFilename(filePath: string) {
|
||||
return t[t.length - 1];
|
||||
}
|
||||
|
||||
const encrypt = (algorithm: string, content: crypto.BinaryLike) => {
|
||||
const hash = crypto.createHash(algorithm);
|
||||
hash.update(content);
|
||||
return hash.digest('hex');
|
||||
};
|
||||
|
||||
export const md5 = (content: string) => encrypt('md5', content);
|
||||
|
||||
export class Queue<T> extends EventEmitter {
|
||||
queue: T[] = [];
|
||||
waiting: any[] = [];
|
||||
|
||||
Reference in new issue
Block a user