Skip to content

Commit c68cb26

Browse files
committed
tidy
1 parent a5aa2e6 commit c68cb26

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

create-hash.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var createHash = require('sha.js')
2-
var algs = {
3-
md5 : toConstructor(require('./md5'))
4-
}
2+
3+
var md5 = toConstructor(require('./md5'))
54

65
function toConstructor (fn) {
76
return function () {
@@ -23,12 +22,7 @@ function toConstructor (fn) {
2322
}
2423
}
2524

26-
var pool = {
27-
sha1: [],
28-
sha256: []
29-
}
30-
3125
module.exports = function (alg) {
32-
if(algs[alg]) return new algs[alg]()
26+
if('md5' === alg) return new md5()
3327
return createHash(alg)
3428
}

0 commit comments

Comments
 (0)