Error handler for nodeJs
npm install cli-error-handler
``sh`
npm install cli-error-handler

`js
const handleError = require('cli-error-handler');
// Let's say we get an error message from a custom command.
const [err, res] = await somePromise();
// Use the function. It will print the error and exit if there is an error.
handleError(Failed while building on step #1, err);`

#### ❯ heading
Type: string
Heading of the error message.
#### ❯ err
Type: error/object
#### ❯ displayError
Type: booleantrue
Default: (optional)
Display the error message or not.
#### ❯ exit
Type: booleantrue` (optional)
Default:
Exit the CLI on error or not?
(follow) To stay up to date on free & open-source software
(follow) To get tech updates/small>
(connect) On the LinkedIn profile y'all
[n]: https://nodecli.com/?utm_source=FOSS&utm_medium=FOSS&utm_campaign=create-node-app
[repo]: https://github.com/AhmadAwais/create-node-app