{"repo":"unjs/consola","free":true,"listed":false,"github":"https://github.com/unjs/consola","clone":"git clone https://github.com/unjs/consola.git","description":"🐨 Elegant Console Logger for Node.js and Browser","language":"TypeScript","stars":7320,"topics":["console","node","terminal","fancy","log","cli"],"license":null,"category":"cli-tools","readme_excerpt":"🐨 Consola Elegant Console Wrapper [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![bundle][bundle-src]][bundle-href] Why Consola? 👌&nbsp; Easy to use 💅&nbsp; Fancy output with fallback for minimal environments 🔌&nbsp; Pluggable reporters 💻&nbsp; Consistent command line interface (CLI) experience 🏷&nbsp; Tag support 🚏&nbsp; Redirect console and stdout/stderr to consola and easily restore redirect. 🌐&nbsp; Browser support ⏯&nbsp; Pause/Resume support 👻&nbsp; Mocking support 👮‍♂️&nbsp; Spam prevention by throttling logs ❯&nbsp; Interactive prompt support powered by clack Installation Using npm: Using yarn: Using pnpm: Getting Started Will display in the terminal: You can use smaller core builds without fancy reporter to save 80% of the bundle size: Consola Methods (logObject) (args...) Log to all reporters. Example: consola.info('Message') await prompt(message, { type, cancel }) Show an input prompt. Type can either of text , confirm , select or multiselect . If prompt is canceled by user (with Ctrol+C), default value will be resolved by default. This strategy can be configured by setting { cancel: \"...\" } option: - \"default\" - Resolve the promise with the default value or initial value. - \"undefined \" - Resolve the promise with undefined . - \"null\" - Resolve the promise with null . - \"symbol\" - Resolve the promise with a symbol Symbol.for(\"cancel\") . - \"reject\" - Reject the promise with an error. See exam","default_branch":null,"files":null,"tree":[],"storefront":"/r/unjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/unjs/consola/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}