{"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.0","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":"3da0007a2140941604641104a8c33fdfd8146b50","bugs":{"url":"https://github.com/freeall/single-line-log/issues"},"homepage":"https://github.com/freeall/single-line-log#readme","_id":"single-line-log@1.1.0","_shasum":"751ed8c336e277e7d19a842433e316c54107747c","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"freeall","email":"freeall@gmail.com"},"dist":{"shasum":"751ed8c336e277e7d19a842433e316c54107747c","tarball":"http://registry-npm.ywwl.com/single-line-log/download/single-line-log-1.1.0.tgz","integrity":"sha512-9U1HrzuU8N7rTIbEmpTLt1oDTMGzAfdAAEUw9uWHhGSfZbsgglcJyp5WkBpRKq0rhsOTmNqnn0CnhIlS9nBQ9g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD14qi0hcn0GeUUQ+8ma62WNGqw+G7NHOc6+zA03ozo1wIhAPTJRgYu/2Wl7ChAPV+hK4Q0gCa+l1mu8hZ5AiYc5fWZ"}],"size":1637,"noattachment":false,"key":"/single-line-log/-/single-line-log-1.1.0.tgz"},"maintainers":[{"name":"freeall","email":"freeall@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/single-line-log-1.1.0.tgz_1456551266908_0.3524855598807335"},"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":1456551268253,"_cnpm_publish_time":1456551268253,"dist-tags":{"latest":"1.1.2"}}