feat: 脚手架基本ok

This commit is contained in:
volare
2022-11-22 00:24:06 +08:00
parent c1981f2951
commit 22b9b2878d
29 changed files with 4001 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import crypto from 'crypto';
export function getIdentifier(name: string, url: string) {
const hash = crypto.createHash('md5');
hash.update(url);
const postFixHash = hash.digest('hex').substring(0, 6);
return `pake-${postFixHash}`;
}