3.4 调试 47 下面是一个简单的例子: $ node debug debug.js < debugger listening on port 5858 connecting... ok break in /home/byvoid/debug.js:11 var a = 1; 2 var b = 'world'; 3 var c = function (x) { debug> n break in /home/byvoid/debug.js:21 var a = 1; 2…
假如有个加密程序test.js,不想每次加密的时候都修改代码,直接通过控制台输入参数 var createHash = require('sha.js') var sha1 = createHash('sha1') var reqStr = process.argv.splice(2)[0] //获取控制台参数 var h = sha1.update(reqStr, 'utf8').digest('hex') console.log(reqStr) console.log(h.toUpperCa…