debug
Inquirer.js
Our great sponsors
debug | Inquirer.js | |
---|---|---|
26 | 37 | |
11,004 | 19,370 | |
0.5% | - | |
3.6 | 9.2 | |
8 months ago | 4 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
debug
-
Conditional logging
Another way to solve this is to have the logs in place, but only enable them conditionally. If you enable all the logs are the time, you only get a lot of noise that won't help you. If you are using JavaScript, you can use the package debug to add logs that are active by the DEBUG environment variable.
-
Has anyone figured out how to enable the millisecond diff feature in the debug package?
I'm using the debug package: https://www.npmjs.com/package/debug, but some reason I don't see millisecond diffs, which would be really useful.
- Help I have a JavaScript Lib that blows away competition but nobody knows of it
-
What is the DEBUG 🐛 environment variable in Node.js, and how to use it?
Although it's used by Express, it's indeed more broadly, the way a popular NPM package called debug works, which is used internally in Express too. Under the hood, the debug package expects the DEBUG environment variable to determine what debug messages to print (could be on the console, or into a file, or into stdout to be collected by a log aggregator service).
-
Automating console logs for dev but removing for prod?
Finally, if they're logs you want to be able to inspect in production without printing them to the console by default, you can use debug.
-
After having used many loggers/debuggers...
It is a drop-in, TypeScript replacement to enhance the widely popular https://www.npmjs.com/package/debug (230k weekly downloads).
-
Create a Node.js command-line library with NRWL NX workspace
debug - npm - Required. A popular library to write debug logs.
-
Debugging Figma and other packaged Electron apps in Visual Studio Code
I strongly recommend using the debug package from NPM to organize your log messages
-
Is it bad practice to log within a shared library?
Use the [debug npm library](https://www.npmjs.com/package/debug) to disable your logging unless someone provides the right environment variable (e.g. DEBUG=* which enables all logging)
-
Debug build vs Prod build
A lot of tools rely on the NODE_ENV environment variable for that, React included. Another great package that’s pretty popular is https://www.npmjs.com/package/debug You can create namespaces and then filter the logs you are interested in.
Inquirer.js
-
Mastering Node.js CLI: Best Practices and Tips
Inquirer.js is a handy tool for adding interactive prompts to your CLI.
-
Painless CLI integration testing
There is a CLI application based on Inquirer. Potentially, it could be another CLI library, say something from the following list. Our goal is to provide integration tests. But before that, let's look at the related terminology.
-
Interactive Node JS command line
inquirer
-
Custom File Generator Tutorial
If you boil plop down to its core, it is basically glue code between inquirer prompts and handlebar templates.
-
Command Line Application: Bank Loan Tracker [Node]
This is a new tutorial on how to create a command line interface application, and our application today is a Mortgage Calculator. I used in this program packages such as 1- inquirer for interactive questions and answers: https://www.npmjs.com/package/inquirer 2- Sqlite3 DBMS 3- Chalk for colorful output in the terminal: https://www.npmjs.com/package/chalk
- Ink: React for interactive command-line apps
- Say Allo' to the new Inquirer
- Say Allo' to the New Inquirer (Node.js CLI)
-
Let’s create a Node CLI for generating files from templates!
We can easily achieve that with the inquirer package. This package allows you to ask different types of questions, such as input questions (open-text questions), confirmation questions (Yes/No), etc.
What are some alternatives?
node-inspector - Node.js debugger based on Blink Developer Tools
yargs - yargs the modern, pirate-themed successor to optimist.
npm-fast-installer - npm-fast-installer - NPM install configuration in top of YAML for fast NPM install usage.
vorpal - Node's framework for interactive CLIs
bugger - Bugs bugging you? Bug back.
chalk - 🖍 Terminal string styling done right
ndb - ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools
shelljs - :shell: Portable Unix shell commands for Node.js
longjohn - Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces
progress - Flexible ascii progress bar for nodejs
swagger-stats - API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
blessed - A high-level terminal interface library for node.js.