Comparing version 1.0.3 to 1.1.0
@@ -11,2 +11,5 @@ (function(){ | ||
message = utf8.stringToBytes(message); | ||
else if (typeof Buffer != 'undefined' && | ||
typeof Buffer.isBuffer == 'function' && Buffer.isBuffer(message)) | ||
message = Array.prototype.slice.call(message, 0); | ||
else if (!Array.isArray(message)) | ||
@@ -13,0 +16,0 @@ message = message.toString(); |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
@@ -36,3 +36,3 @@ # MD5 | ||
``` | ||
```javascript | ||
"78e731027d8fd50ed642340b7c9a63b3" | ||
@@ -39,0 +39,0 @@ ``` |
@@ -18,2 +18,8 @@ var md5 = require('./md5.js'); | ||
}); | ||
it('should support Node.js Buffers', function() { | ||
var buffer = new Buffer('message áßäöü', 'utf8'); | ||
assert.equal(md5(buffer), md5('message áßäöü')); | ||
}) | ||
}); |
11558
156