{"name":"log-update","version":"2.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":">=4"},"scripts":{"test":"xo && node test.js"},"files":["index.js"],"keywords":["log","logger","logging","cli","terminal","term","console","shell","update","refresh","overwrite","output","stdout","progress","bar","animation"],"dependencies":{"ansi-escapes":"^3.0.0","cli-cursor":"^2.0.0","wrap-ansi":"^3.0.1"},"devDependencies":{"xo":"*"},"gitHead":"f6ce1d44d268d630417a02a78a1f91480b7e252f","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@2.3.0","_shasum":"88328fd7d1ce7938b29283746f0b1bc126b24708","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"88328fd7d1ce7938b29283746f0b1bc126b24708","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-2.3.0.tgz","integrity":"sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUJLW8YMRIPscoDp9qfBRsQECClgRoxc3hMC3we2R77AiAYa1/5fC3W6A0rOD5QmYkqiXNmvZLH1wvCOLk/CSDmPw=="}],"size":2425,"noattachment":false,"key":"/log-update/-/log-update-2.3.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"},{"name":"samverschueren","email":"sam.verschueren@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update-2.3.0.tgz_1509779446402_0.010598235065117478"},"directories":{},"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":1509779446470,"_cnpm_publish_time":1509779446470,"dist-tags":{"latest":"8.0.0"}}