{"name":"log-update","version":"3.3.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":"52732bf744e1248658eac47e4865e3997341f54e","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.3.0","_nodeVersion":"10.16.0","_npmVersion":"6.10.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-YSKm5n+YjZoGZT5lfmOqasVH1fIH9xQA9A81Y48nZ99PxAP62vdCCtua+Gcu6oTn0nqtZd/LwRV+Vflo53ZDWA==","shasum":"3b0501815123f66cb33f300e3dac2a2b6ad3fdf5","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.3.0.tgz","fileCount":5,"unpackedSize":6522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbn6fCRA9TVsSAnZWagAAVZIP/27s27SOqpMGL381/5sH\nqc+tI4w2rHOJY0AhU8Jcuc74qLEzpFd/0EUUhGRhyaO9zGQZNgQhVXNqyJpC\nFz+bLOlCz5NfkhCoCYun+mjxdGGl7AaIEusByYtXUd+zGeDtC4JZ0W48Luve\nLwAQi9WSunn4TdFNDBQeLg3FzhXqFcjUJoGwQqciTxQrMUyNK7NdzEjizAgM\nYz0lyOGLJ7QjTHALGSlstlALK17iytM1vOzXUlNzrkddSxSX+CeUWhQ73AZL\nj+kWpboJDGqbhXGs2rdJkHH2IQhgX4Gpapj7twH0EYRCqSfLDx7y3HilAYFD\nT29706U02engtSmJOd18L5T9jpuXjkfiwkoq1URABS3QycZOtLCiJdxsRZto\nI+DHBC/DLS7QWovhR9qYsKNZDXGogRzKk+jGpEANYF055W7s9sAv0NbJKV2e\nfYf/g4sYq4tjOVwncy9GOcpVHd7DFS4fjbsDXWhFyH9tb953enhsmf1lyiVC\nKg070JFEqETRP5gEc4KCEQQBl6/TSk6Qi1gF1t+F5VeHnN8suvqxrKkYIdeA\ne3dlHkXtej2xzq9svUUlcIFUi+9JUX974g97ghjrgVZrLuRcEUXf+IjFJUeF\nvYao2zPuwik9xoUFJOO1OC493SMl0GZfM7OB7lHJRdJL8HXedYwhqbXwC0HZ\n7to9\r\n=7DN8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk0K6U6wmvYsUYUN7mDreqGBBaCFkdZtD61AztE5CVkAIhALrsbt7WanQnXvM4w1tDFSiu+TOYmZp5fxawvHrhJG5q"}],"size":2813,"noattachment":false,"key":"/log-update/-/log-update-3.3.0.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_3.3.0_1567522463005_0.2139820345696073"},"_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":1567522463116,"_cnpm_publish_time":1567522463116,"dist-tags":{"latest":"8.0.0"}}