Skip to content
Myr

use trimRight()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent eea372f · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:lib/commander.js+1 added-2 removed
768 unmodified lines
769 var buf = [];770 console.log(str);771 process.stdin.setEncoding('utf8');772 process.stdin.on('data', function(val){773 //node on windows returns '\r\n'773 if ('\n' == val || '\r\n' == val) {774 process.stdin.removeAllListeners('data');775 fn(buf.join('\n'));776 } else {778 buf.push(val.replace(/\s+$/, ''));777 buf.push(val.trimRight());778 }779 }).resume();780};781
210 unmodified lines