{"name":"log-update","version":"4.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"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=10"},"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":"^4.3.0","cli-cursor":"^3.1.0","slice-ansi":"^4.0.0","wrap-ansi":"^6.2.0"},"devDependencies":{"@types/node":"^13.7.4","ava":"^3.3.0","terminal.js":"^1.0.10","tsd":"^0.11.0","xo":"^0.26.1"},"gitHead":"c913bf692090d2948f2bcedfb479a1b91f899037","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@4.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==","shasum":"589ecd352471f2a1c0c570287543a64dfd20e0a1","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-4.0.0.tgz","fileCount":5,"unpackedSize":7575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTj41CRA9TVsSAnZWagAASPoP/A5Q2OP8CfJUfs0VF9k4\n0TPz4OFYCJ5TAW0IAPxf87tu0MDfFFhDZqupm9EcGB3ujxg0CH5iSUNK8fXS\n82YtBRZMBoSgri/f7GlFWNhkOB9FgfNthHoNNl0en2yf/+ojV2WGe6WZUtHs\nVXtjdXH5lgrce0a5BVSudjcPvd1/8+/6RWDFn64baxx6RX5udICO5C1UvEQ4\nF+ID4iMiGi9I5FvW8KGsAZzO2ptipeqzXB5/MvY1PT5ruAc+FrBsVEMmYNvh\nkwN6TQGi2tZMmpzrpc38Lde9Gd3gYORv1z9meaxl7TsiEJev7UJS2eBGszbt\nL2WhPVtvxhnlII9Vqb73yarW3t4h1aCZB8iK6kdVihekPedKmjCG6XIF3fjG\nxnu4XBKLcmExGHS5MNOnOaVfhaPvG4tBNFqqa7iSKlrNlSNcj+hW11aUBT0F\nhOdZI+n/wmyVHZMmGtUIbF1/DdHQIE0Hml1vcNMrjbowDza0BFSALqeb83Wk\nQH6NNNU6XiZoLu4bUGIcdH8QsABkW3i0EXihbo89nsy2CY4bOLg03WENvb9Q\nIj0Og4DJm4bMsTsTFNvcrAlAIyKMvVxvn11OsQoHEAowRT38JhGCTaa6rk19\nhzSg1NI1JBgTZ3biJ4lPHKBX9RYyo1XsSoJoo26/B6nRx9BXHYK7abh6HCkP\n8ig7\r\n=oEUE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGG4iUkEFxUHS4H+EOTT1BnWTQXKBDfbiYmyv+KAtVj6AiEAninLAY/Io2y5/Vyf/jND2U/emPDMrPQGKHWthjKnRAw="}],"size":3161,"noattachment":false,"key":"/log-update/-/log-update-4.0.0.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_4.0.0_1582186037542_0.3543418798824487"},"_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":1582186037654,"_cnpm_publish_time":1582186037654,"dist-tags":{"latest":"8.0.0"}}