{"name":"log-update","version":"3.1.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-check"},"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.10.4","ava":"^1.2.1","terminal.js":"^1.0.10","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"17712c58a1785b75ace571b00628819fbfa5ec7f","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-7ttbZj4w165ZemmS9YngKbBh4/UEiW1gS+SPpfQQHIMYcPMybTDM6UDlmQLrjJ8+j23On173OFB+pXKfPRJP3A==","shasum":"fa22abbbcb30f505906758bbbd0f292b71bc2ad9","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.1.0.tgz","fileCount":5,"unpackedSize":6154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfjxHCRA9TVsSAnZWagAA/OoP/itPu10IYeDh1sG4LTpD\neG8JN5GRBXfv8o57XN4aokaqa1CpaY0HfJNV09BVcYo41rT4vxsNYUG9DVxD\n48nB7YjXWTj9sEJzWlMyv1euEkX24yt7iEidn78V+0HtR19nZEL6KgR+1p7t\nwATZ7FuKcFlxQLqi6HjleA4K2L1RwnjOoTj773xgv5OWe9eJtbe0XKEYvmo8\nQdX9irC28MRXfRFl5W1ZxEs6prQeydNYOc4aKivslihuKiTdi46wGaQxvYSi\n9UbwVipERECjKCUdOBiLbahCE2+FsdX5SCzz/ZkurI7L0yg8MdzPqYK6MLkT\nooAkdVKHqW4iOIvBR7bEKtMAzSmcQnFcJ8r5iGmMOFCvrV93sMmudN4T+zRy\nOsy4cgIaReHWcdanjdcvZbJ2p6GZoLDHNeLc0H4nGtcExoKNMEKlVaw+zXqq\nd98TEnCaxTcRXdl32g0/NQfqekBAyeT9+pEKzWq9UFsnvJUERqyRg/WVzbko\nLnZ8KuaXq5/Ws1LrjSlzu/jfpzT1jjejs8XhSXJY7ZATdC7ls0DYA2DNw7jJ\ngOi471DihFN+ojvpmMcKhcbwmLtwtejI07GtYDl5OTWIqCg+t2jbhNB9ZaLz\nhwDVKuAKcVUVCkrhr5M6VcKn4nTEjrrnrdhInVa1YuazHbmJiwDN3RVv1+6e\nDKlq\r\n=82Mt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGu9vOjX0wH9sDWIarW/AcYPExXF5EaYKhMBzmBXhmgJAiBkXhGInIVVaZyovMInev8CkVcblb3oSZyZWP6fpZcIqg=="}],"size":2776,"noattachment":false,"key":"/log-update/-/log-update-3.1.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"},{"name":"samverschueren","email":"sam.verschueren@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_3.1.0_1551776839291_0.6102797913343514"},"_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":1551776839436,"_cnpm_publish_time":1551776839436,"dist-tags":{"latest":"8.0.0"}}