{"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.0.1","repository":{"type":"git","url":"git://github.com/freeall/single-line-log.git"},"license":"MIT","author":{"name":"Tobias Baunbæk","email":"freeall@gmail.com"},"gitHead":"7d66614763f9c99e60dc311c128f182eb66ebbac","bugs":{"url":"https://github.com/freeall/single-line-log/issues"},"homepage":"https://github.com/freeall/single-line-log#readme","_id":"single-line-log@1.0.1","scripts":{},"_shasum":"841b90b671fa3c936c0ac2bc963f94010b60d2a0","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"freeall","email":"freeall@gmail.com"},"dist":{"shasum":"841b90b671fa3c936c0ac2bc963f94010b60d2a0","tarball":"http://registry-npm.ywwl.com/single-line-log/download/single-line-log-1.0.1.tgz","integrity":"sha512-MRNScG5AxQmjDYlOAcTnzr/kupB+mKpPvXll6fFc7gdE3f02estkT7GGnh6b5II99RRy6SNM8+w1n030z7DwhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC7Qs7kqRHOsiVuVH2pKDH36o3pNh9OlNs8eWrdu/9sjAiBCbufk2gSeekbAhcMET5pwA/y6jd0e/pKfOPUrUEFKZA=="}],"size":1432,"noattachment":false,"key":"/single-line-log/-/single-line-log-1.0.1.tgz"},"maintainers":[{"name":"freeall","email":"freeall@gmail.com"}],"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":1446624262406,"_cnpm_publish_time":1446624262406,"dist-tags":{"latest":"1.1.2"}}