New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sha1

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sha1 - npm Package Compare versions

Comparing version

to
1.1.0

2

package.json

@@ -12,3 +12,3 @@ {

],
"version": "1.0.1",
"version": "1.1.0",
"repository": {

@@ -15,0 +15,0 @@ "type": "git",

@@ -11,4 +11,7 @@ (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))
message = message.toString();
// otherwise assume byte array

@@ -15,0 +18,0 @@

@@ -18,2 +18,9 @@ var sha1 = require('./sha1.js');

});
it('should node.js Buffer', function() {
var buffer = new Buffer('hello, sha1', 'utf8');
assert.equal(sha1(buffer), sha1('hello, sha1'));
})
});