{"name":"log-update","version":"3.2.0","description":"Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/log-update.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["log","logger","logging","cli","terminal","term","console","shell","update","refresh","overwrite","output","stdout","progress","bar","animation"],"dependencies":{"ansi-escapes":"^3.2.0","cli-cursor":"^2.1.0","wrap-ansi":"^5.0.0"},"devDependencies":{"@types/node":"^11.12.2","ava":"^1.4.1","terminal.js":"^1.0.10","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"abd40b04b7dcfcc6dba91171ddaf0d7f271e7788","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.2.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-KJ6zAPIHWo7Xg1jYror6IUDFJBq1bQ4Bi4wAEp2y/0ScjBBVi/g0thr0sUVhuvuXauWzczt7T2QHghPDNnKBuw==","shasum":"719f24293250d65d0165f4e2ec2ed805ff062eec","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.2.0.tgz","fileCount":5,"unpackedSize":6658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoc83CRA9TVsSAnZWagAA7JsP/3KszyFG8qIHZnuO/SZ/\nG1RrvLqY5YPa7fBfXfUmfSRX/n0BflQegARVkiLGwTajv7NeDKS265SMs9NU\nfgU6YeZa16Hq8r2W5zvPAKjcMZpcLepVC9zeEN6ZvVTEb0gjWb6/96rmmNUJ\nY7qWuaoT6zaAcgl8Ni9KyIMeRNzM1biuuTVYcpjq/gy1Xs/iIrf2D0y95PYh\n9d0KQjMVAYg++8ShuSJI45sIqSa/k1mnNfpEIT+IVBqy1MPiswZ7Yk/lB1JD\n8bG/9ICcTIjatYLZT+w9IooDMkyxCAD7vuorfgZmHjT9N9pXBC6L3cnolxE0\nqUrwPoxz6+xavaCSeovZUr6uKnJDjbMS701gSaYr5l93DK9NtrLPq+KSDLiE\nr1EEqfsrPTizC1SDGXHxUCq5Nf8yZl4N17hwigqxYRA/FmRiaOv/wU5rM5gn\nPV/s7vTYGJc1pj2FTKFifWxbi592WWc4wBgZDvo/W43cA9bJFoVn4I1WuVoz\ngWfkVSmmV+ZYTRsvqTowFCA4BJOwBHw/euLHPRyoxXCj/LHufgFFqSXfnsO0\nXhgZtqvu3MrvAjAqStidjuC9wh7nGcG/qsMelhfgLsYK2Vrfu1cets6v9mhV\ngPIWb+5iD2PEdcWTXL7Pp4CahoyGAnAPOvJWRg0iCdsNVJxtu2/17cskXtsB\nt1iR\r\n=Y4kN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID19aWTRG54B983zYqHocowFIA4I+Ho9gpTOhaK8qgptAiB46Fl4uFgAjj5JoZid2Nudk1tiNV/I3RUE3ReSlbc4PQ=="}],"size":2866,"noattachment":false,"key":"/log-update/-/log-update-3.2.0.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_3.2.0_1554108214159_0.21840118365596606"},"_hasShrinkwrap":false,"readme":"# log-update\n\n> Log by overwriting the previous output in the terminal.\\\n> Useful for rendering progress bars, animations, etc.\n\n![](screenshot.gif)\n\n## Install\n\n```sh\nnpm install log-update\n```\n\n## Usage\n\n```js\nimport logUpdate from 'log-update';\n\nconst frames = ['-', '\\\\', '|', '/'];\nlet index = 0;\n\nsetInterval(() => {\n\tconst frame = frames[index = ++index % frames.length];\n\n\tlogUpdate(\n`\n        ♥♥\n   ${frame} unicorns ${frame}\n        ♥♥\n`\n\t);\n}, 80);\n```\n\n## API\n\n### logUpdate(text…)\n\nLog to stdout.\n\n### logUpdate.clear()\n\nClear the logged output.\n\n### logUpdate.done()\n\nPersist the logged output.\n\nUseful if you want to start a new log session below the current one.\n\n### logUpdateStderr(text…)\n\nLog to stderr.\n\n### logUpdateStderr.clear()\n### logUpdateStderr.done()\n\n### createLogUpdate(stream, options?)\n\nGet a `logUpdate` method that logs to the specified stream.\n\n#### options\n\nType: `object`\n\n##### showCursor\n\nType: `boolean`\\\nDefault: `false`\n\nShow the cursor. This can be useful when a CLI accepts input from a user.\n\n```js\nimport {createLogUpdate} from 'log-update';\n\n// Write output but don't hide the cursor\nconst log = createLogUpdate(process.stdout, {\n\tshowCursor: true\n});\n```\n\n## Examples\n\n- [listr](https://github.com/SamVerschueren/listr) - Uses this module to render an interactive task list\n- [ora](https://github.com/sindresorhus/ora) - Uses this module to render awesome spinners\n- [speed-test](https://github.com/sindresorhus/speed-test) - Uses this module to render a [spinner](https://github.com/sindresorhus/elegant-spinner)\n","publish_time":1554108214499,"_cnpm_publish_time":1554108214499,"dist-tags":{"latest":"8.0.0"}}