[Pkg-javascript-commits] [node-sha.js] 199/237: hash: adhere to standard

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:04:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-sha.js.

commit 1334d89fe96a5854c2871c6352bc6d1a7f843145
Author: Daniel Cousens <github at dcousens.com>
Date:   Sat May 30 13:25:15 2015 +1000

    hash: adhere to standard
---
 hash.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hash.js b/hash.js
index 853ec06..09579d2 100644
--- a/hash.js
+++ b/hash.js
@@ -1,6 +1,6 @@
-//prototype class for hash functions
+// prototype class for hash functions
 function Hash (blockSize, finalSize) {
-  this._block = new Buffer(blockSize) //new Uint32Array(blockSize/4)
+  this._block = new Buffer(blockSize)
   this._finalSize = finalSize
   this._blockSize = blockSize
   this._len = 0
@@ -8,8 +8,8 @@ function Hash (blockSize, finalSize) {
 }
 
 Hash.prototype.update = function (data, enc) {
-  if ("string" === typeof data) {
-    enc = enc || "utf8"
+  if (typeof data === 'string') {
+    enc = enc || 'utf8'
     data = new Buffer(data, enc)
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git



More information about the Pkg-javascript-commits mailing list