{"name":"log-update","version":"3.0.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"},"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":{"ava":"^1.2.1","terminal.js":"^1.0.10","xo":"^0.24.0"},"gitHead":"433ad00b8ea26355a0c6c9b8347fc320e720646b","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.0.0","_nodeVersion":"10.15.1","_npmVersion":"6.8.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-xhQH4g9biBnuNMYm/NjWgL2VDWPj60byIHvy8Zd9oy2+r2xO71NDmwSd7nEoznhcVuFsDyKoyEgORJWaotqoPg==","shasum":"a79767dbbd2f1f46e2e763d8459a20c8179525b0","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.0.0.tgz","fileCount":4,"unpackedSize":4876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJce3e3CRA9TVsSAnZWagAA80IQAJVL6bH/Pcx78fQzkNgB\nTzsBQGuh44BEhe3UGaTVqyfwn3Do/Gk6DdLah6UBWPSShvIeaPYnPhZ2WnRT\nOWllGlzqijrH3cOHYgLHTOF0g6sxVpVjHXdh7fmturuhA/cs2K3FRz49I3Jy\nqddeDdpiiL0xsoIW4uU9qJ7ccdqTQcPEUAVwffrKjaBnWxZguyHmwMynTWJJ\ncuvKbivfx5ZRarsSbnfCulpriWEmmRhk1CcxYQ3UeLxN2xJAQln94odBN2hk\nesTjedtJu/+ura45no2ttFjsQb71g/clic6Vs+F/hizT8tcTuT6o979hqMX3\nOT3uWaNmVpwIHJmsGuyHOPobwpQRU3+OSvt3CSQx+OO/+18y8kFnNJzkIG93\nbXfHozZ7gaeadjxki5hcy7Ase9a2Z+h0vyKZ6hBCLmG9OEIbp/a/kuEODfGu\nKFVmgqQNlt/P+kz1/abfXLUhLfagaRh2smTlCruF9/RByExRPq2mPeGY3g+m\n7wsrLAtjHNfrMphTKUtrG2rUM5q1+HxCblkPkwucKanN/W/ZOVd8OmLjOHLi\nIYIGF3s6HjjP6GqZK5S+4UoQBLCztsVMHJIZ09LVg0mYd4x8aguIMPbbmVI9\nNg8y0cE2sBFtTvOMjeyJM73Tj5Otq9QYCgn4OfZAkPILtp5J4GnaEWwnEn0w\nKcF6\r\n=Hlos\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+/pggnU+LOObI+vivGm5nOz66A48rqLY3rfhxEYCB8AiARxXruH8uR4JIAsElQnk3oRbdTqVTAOOsiLVfPMzEldA=="}],"size":2407,"noattachment":false,"key":"/log-update/-/log-update-3.0.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.0.0_1551595446508_0.015726535913616058"},"_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":1551595446729,"_cnpm_publish_time":1551595446729,"dist-tags":{"latest":"8.0.0"}}