{"name":"single-line-log","description":"Keep writing to the same line in the terminal. Very useful when you write progress bars, or a status message during longer operations","keywords":["single","line","log","output","overwrite","collapse","stdout","terminal","tty","cli","shell"],"version":"1.1.1","repository":{"type":"git","url":"git://github.com/freeall/single-line-log.git"},"license":"MIT","author":{"name":"Tobias Baunbæk","email":"freeall@gmail.com"},"dependencies":{"string-width":"^1.0.1"},"scripts":{"test":"node test.js"},"gitHead":"db2d6e4b2a1b167b5998d32f1f4ce684a3557cb1","bugs":{"url":"https://github.com/freeall/single-line-log/issues"},"homepage":"https://github.com/freeall/single-line-log","_id":"single-line-log@1.1.1","_shasum":"f87743dfdb5519b5fe1dda36edd68f35e3cb5de6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"f87743dfdb5519b5fe1dda36edd68f35e3cb5de6","tarball":"http://registry-npm.ywwl.com/single-line-log/download/single-line-log-1.1.1.tgz","integrity":"sha512-eI4Oy+qAsuvgQdSN342YV+okPz5+JXVmwpdFCxXKRezWQl+JtdvahH029Sfezu//gw44QRQFi7ONMG3fkZ5lKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFiTmdtMq0rK3RNlJB/lyYUCx0gp1/+th3pwvvLruTzwAiAY/7qy6OLgLPK6RDlNJtVsSledsEZlm6m/8ypf7+GlCw=="}],"size":1622,"noattachment":false,"key":"/single-line-log/-/single-line-log-1.1.1.tgz"},"maintainers":[{"name":"freeall","email":"freeall@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/single-line-log-1.1.1.tgz_1456686739188_0.03980169352144003"},"directories":{},"readme":"# single-line-log\n\nNode.js module that keeps writing to the same line in the console (or a stream). Very useful when you write progress bars, or a status message during longer operations. Supports multilines.\n\n\n## Installation\n\n\tnpm install single-line-log\n\n\n## Usage\n\n``` js\nvar log = require('single-line-log').stdout;\n// or pass any stream:\n// var log = require('single-line-log')(process.stdout);\n\nvar read = 0;\nvar size = fs.statSync('super-large-file').size;\n\nvar rs = fs.createReadStream('super-large-file');\nrs.on('data', function(data) {\n\tread += data.length;\n\tvar percentage = Math.floor(100*read/size);\n\n\t// Keep writing to the same two lines in the console\n\tlog('Writing to super large file\\n[' + percentage + '%]', read, 'bytes read');\n});\n```\n\n## .clear()\n\nClears the log (i.e., writes a newline).\n\n``` js\nvar log = require('single-line-log').stdout;\n\nlog('Line 1');\nlog.clear();\nlog('Line 2');\n```\n\n\n## .stdout\n\nOutputs to `process.stdout`.\n\n\n## .stderr\n\nOutputs to `process.stderr`.\n\n\n## License\n\nMIT","publish_time":1456686741847,"_cnpm_publish_time":1456686741847,"dist-tags":{"latest":"1.1.2"}}