Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc.
by sindresorhusJavaScript
Last 12 weeks · 0 commits
4 of 6 standards met
Hi there! Been happily running on Deno. It's helped me massively with all the ephemeral logs from a very chatty test runner that I've been writing. So the other day I took all that stuff, slapped a Vite on it, and found out that when code depending on runs in a browser, this happens: breaking all downstream of where I import - so, everything. Polyfilling didn't help. Recommended polyfill doesn't define the at all. Guess that makes sense in a browser, haven't figured out how to best plug stubs for them yet. Putting it behind a flag didn't help. Trying to a logger on module load (making the module itself stateful), still breaks once it doesn't find a completely Node-like . There's probably a correct workaround on the bundler side which I'll keep looking for, anyway I can only hope that you see the problem here and its solution. Thanks! ❤️
Repository: sindresorhus/log-update. Description: Log by overwriting the previous output in the terminal. Useful for rendering progress bars, animations, etc. Stars: 1166, Forks: 42. Primary language: JavaScript. Languages: JavaScript (99.3%), TypeScript (0.7%). License: MIT. Latest release: v8.0.0 (4mo ago). Open PRs: 0, open issues: 0. Last activity: 4mo ago. Community health: 85%. Top contributors: sindresorhus, SamVerschueren, BendingBender, djmitche, herecydev, etiktin, Jameskmonger, jamestalmage, r4j4h, kj800x and others.