{"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.2","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":"515b3b99b699396c2ad5f937e4b490b6f9fbff0e","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.2","_shasum":"c2f83f273a3e1a16edb0995661da0ed5ef033364","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"freeall","email":"freeall@gmail.com"},"dist":{"shasum":"c2f83f273a3e1a16edb0995661da0ed5ef033364","tarball":"http://registry-npm.ywwl.com/single-line-log/download/single-line-log-1.1.2.tgz","integrity":"sha512-awzaaIPtYFdexLr6TBpcZSGPB6D1RInNO/qNetgaJloPDF/D0GkVtLvGEp8InfmLV7CyLyQ5fIRP+tVN/JmWQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVaL+NjBQxN5/KYPiE0sUJrfazFD6xJXGhlqLM1yXV5gIhAOMtmPA3oRof2gMEQCd0+H2oqW123sDIQkcUaK6DtDxM"}],"size":2314,"noattachment":false,"key":"/single-line-log/-/single-line-log-1.1.2.tgz"},"maintainers":[{"name":"freeall","email":"freeall@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/single-line-log-1.1.2.tgz_1473399388288_0.17821224196814"},"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":1473399390030,"_cnpm_publish_time":1473399390030,"dist-tags":{"latest":"1.1.2"}}