This commit is contained in:
Opportunity
2020-05-24 00:59:25 +08:00
Unverified
parent 77cd51991f
commit 2feaa3232f
12 changed files with 123 additions and 62 deletions
+9
View File
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function Sha(sha) {
sha = sha.trim().toLowerCase();
if (!/^[a-f0-9]{40}$/g.test(sha))
throw new Error(`Invalid sha value ${sha}`);
return sha;
}
exports.Sha = Sha;