[Pkg-javascript-commits] [node-sha.js] 101/237: tidy

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:03:39 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 e34e8b540202f4f548a70d44600287f9e2bd6e82
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Wed Jan 15 13:12:18 2014 +0700

    tidy
---
 bin.js | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/bin.js b/bin.js
index 3adebec..ef105f6 100755
--- a/bin.js
+++ b/bin.js
@@ -1,6 +1,6 @@
 #! /usr/bin/env node
 
-var createHash = require('./')
+var createHash = require('./browserify')
 
 var argv = process.argv.slice(2)
 
@@ -14,7 +14,9 @@ function stream (alg, s) {
     hash.update(data)
   })
   .on('end', function (data) {
-    console.log(hash.digest('hex'), Date.now() - start)
+    if(process.env.DEBUG)
+      return console.log(hash.digest('hex'), Date.now() - start)
+    console.log(hash.digest('hex'))
   })
 }
  
@@ -24,12 +26,6 @@ if(!process.stdin.isTTY) {
   var filename = argv.pop()
   var alg = argv.pop()
   stream(alg, require('fs').createReadStream(filename))
-
-//  require('fs')
-//    .readFile(filename, function (e, data) {
-//      console.log(createHash(alg).update(data).digest('hex'))
-//    })
-//
 } else {
   usage()
 }

-- 
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