{"name":"log-update","version":"3.1.1","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":"4a91774a0eccff8a449df4d12976746c27bb0cff","bugs":{"url":"https://github.com/sindresorhus/log-update/issues"},"homepage":"https://github.com/sindresorhus/log-update#readme","_id":"log-update@3.1.1","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-kqnFtiui/54LE2Sud9D/+p9vDXGUK9J2ISJ1kFd6LXHnodLWpsbLvf+iD1aQEpCniLPIAQpimg37mktmNkpNiA==","shasum":"c8c86e44d9f0ecb816e364ed4e8dfc58760a4573","tarball":"http://registry-npm.ywwl.com/log-update/download/log-update-3.1.1.tgz","fileCount":5,"unpackedSize":6134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoRGFCRA9TVsSAnZWagAAS8oP+QC1xrWtCxp36AaRFLdJ\nt/XyArvV+N8xiwYOBpNF6zaQ0xYZNkayJxAE3gfagIJk9M5UHoSlmALz8uVY\nI9BS5zBC7BWjLKRpzNWFlFcRVw3HUPtv5prHU6nnjD/qEXStXS2ncuo7djSC\nWYwwql+/242rE1SjSP4Jt8HOWtUV5tQR1OzJqK1e93yp0Rqx25xMfxEGuE5a\nXJQre8no5OAGkEF2R6JAeW0rXXPLixL/sbVt+AA8AvYSoevJlHzxz0T4z7SF\nFBq5W64n14Ll/p/kLP3wIzEWcgUuySbGpgfKMRPOrTbC98NTW2RvFmBvkVyA\nWCrC2F0RbJ0TGdzVxHcBckAvTztgn617xMRxyfeu+8A6MOM39geRkdfO13GG\nu71liLS67S/SslTywwxy7LanSyDjsVswkfSAGSXUuNEreAS5QjmVfFVS9FTJ\nBcY9Vpa6hJT6L31Uw0D6iNlSV1X4zLeBHlbQnqpn9yooZzsp2VIrRBFQtgis\nfSa0SZklKZ6Yp5jW72WT1XztCK7HToXFNTkLvVNyR2Zsy1X6AaLI/GQQ6h+2\nQcwOvDdB2tpLqm09xlETRAWHt7NaE1iZs/FYOGJyA5ZBS5XJ/GNkgk/ZF/ar\nUuKMET8yb+fyEoSPApLQEfliNnUwigJsO3snzmtIJQWguDmtyEbQW1eKiusV\nIIXz\r\n=OxVu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5cjQQQS32YEYa5VqjgoVX5jiDa8UyEUrWgo7THonJjAIgOTtfTykLR8PBTiDzM0yJKOWQJu7k/OsLeU9dsOH3yBk="}],"size":2768,"noattachment":false,"key":"/log-update/-/log-update-3.1.1.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-update_3.1.1_1554059652561_0.04898043047180045"},"_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":1554059652659,"_cnpm_publish_time":1554059652659,"dist-tags":{"latest":"8.0.0"}}