chore: migrate code to ESM (#73)

This commit is contained in:
Luca Casonato authored and GitHub committed 2024-09-13 17:15:41 +02:00
1 parent f8480e68ca
commit f1ac2c87b8
905 files changed
+69790 -56120

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
import crypto from 'crypto';
function sha1(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return crypto.createHash('sha1').update(bytes).digest();
}
export default sha1;