{"name":"log-update","version":"3.4.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"},"funding":"https://github.com/sponsors/sindresorhus","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":"7cb447f50942c827a072280c5a451c1f1ff1ea0e","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.4.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-ILKe88NeMt4gmDvk/eb615U/IVn7K9KWGkoYbdatQ69Z65nj1ZzjM6fHXfcs0Uge+e+EGnMW7DY4T9yko8vWFg==","shasum":"3b9a71e00ac5b1185cc193a36d654581c48f97b9","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.4.0.tgz","fileCount":5,"unpackedSize":7320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNvvACRA9TVsSAnZWagAAEaIP/126lMv7OSVm7eaLuNZu\nBcdoBQeC354LMQtlcjW1jf9KcmQ48t7wPXTimq4tZxYl0JDsYTxbFKDbIZSr\ny491VXuOi4LLDQECr79V5rhjuahW4u2Ut0wzM3QJ3v0gePIVYHfGqC8t74fh\nj5cwl2cooh8XOa+9EGhkxI+yXI8pZVQ9e7GuDP5CP1+KFYHvzeurk49El+pH\nL21CalN7hEnNLThpcN0HvJtbn2kG5eXRvJZXiNt8BdBTdaO3kZh13ySV+0R3\n7Xxve4iwp6L+LdV4m95BHfnF1qQ9WfzGZ5r6i+mED4DfWxn6RwL2IGGSuIOm\nxYSVO1GUXRYq/HyQFxWqKl8vm97O9fPEI/JV7T6jXpT9pKVL7p1xKMhaJOxy\ngBr6kw+87tNViPFMTZpCkjpItn22iCXToYHnolLhFbtpuH9XDffCpYF3GQEV\n/cuLsRR3OhiB9s6ftoFdrLk4vhOJAvpIYwvvnn5FjKt+1ZaSiQL6BSSVAzPj\nYwmO+lnFTcbRNi+B+zc6QqgNme4yoIs42KfEnNp136dx9U2nDFa7ROCaG+r3\nauiCrkRpE+1+6QTpjjAUWTvNWVR+NK3TkHSn9LsXZagA4kASEDrrM4ltuhpZ\nXBWGwS9DzB0B0vcKFJT8NB6kohUzH9PehlzFZpCpik9AwnPOCEBUQlaQ9ZMv\ncPM1\r\n=hK2N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqEOCJbqL4iFlYko8XcSzzZdfmEHdU/mulg97b4LM2TAIgZR6FuLGYwMUKkONcXXt4Ejglyy7Da532sIJaidlVPK0="}],"size":3100,"noattachment":false,"key":"/log-update/-/log-update-3.4.0.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_3.4.0_1580661695979_0.7862256735678375"},"_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":1580661696229,"_cnpm_publish_time":1580661696229,"dist-tags":{"latest":"8.0.0"}}