https://github.com/bukinoshita/shout-error
An opinionated error message
https://github.com/bukinoshita/shout-error
console error javascript message nodejs
Last synced: 9 days ago
JSON representation
An opinionated error message
- Host: GitHub
- URL: https://github.com/bukinoshita/shout-error
- Owner: bukinoshita
- License: mit
- Created: 2017-06-17T23:42:43.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-01-05T08:06:19.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T18:53:24.177Z (8 months ago)
- Topics: console, error, javascript, message, nodejs
- Language: TypeScript
- Size: 597 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# shout-error [](https://travis-ci.org/bukinoshita/shout-error)
> An opinionated error message
## Install
```
$ yarn add shout-error
```## Usage
```js
const { shoutError } = require('shout-error')const error = new TypeError('Ops, something wrong happened')
shoutError(error)
```_Uses [chalk](https://github.com/chalk/chalk), will return a error message with a nice color._
## API
### shoutError(message, label)
#### message
Type: `string` or [`instanceof Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) or [`instanceof TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)
Required#### label
Type: `string`
Default: `> Error!`## Related
- [shout-message](https://github.com/bukinoshita/shout-message) — An opinionated message
- [shout-success](https://github.com/bukinoshita/shout-success) — An opinionated success message## License
MIT © [Bu Kinoshita](https://bukinoshita.com)