Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hasinhayder/colorconsole
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser
https://github.com/hasinhayder/colorconsole
javascript npm typescript
Last synced: about 2 months ago
JSON representation
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser
- Host: GitHub
- URL: https://github.com/hasinhayder/colorconsole
- Owner: hasinhayder
- Created: 2022-06-01T17:38:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-03T09:07:04.000Z (over 2 years ago)
- Last Synced: 2024-10-29T02:10:04.614Z (2 months ago)
- Topics: javascript, npm, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@hasinhayder/colorconsole
- Size: 17.6 KB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ColorConsole NPM Package
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser.
![](https://res.cloudinary.com/roxlox/image/upload/v1654246755/assorted%20/283283450_10159158088149633_6008511946195677596_n_jaajhq.jpg)
## Available Methods
```javascript
colorconsole.warning("some warning message")
colorconsole.success("some success message")
colorconsole.info("some informations")
colorconsole.error("some error message")
colorconsole.log("normal message")
colorconsole.custom("custom message", "red", "#fff", 20, 5)
- custom parameters:
- message: string
- backgroundColor: name | hex | rgba | rgb | hsl
- textColor: name | hex | rgba | rgb | hsl
- fontSize: number
- padding: number
```# Use in ESM Projects
```shell
npm install @hasinhayder/colorconsoleor
yarn add @hasinhayder/colorconsole
```then
```javascript
import colorconsole from '@hasinhayder/colorconsole'colorconsole.success("ColorConsole is Working")
colorconsole.log("A Simple Message, just like console.log()")
colorconsole.warning("This is a warning")
colorconsole.info("ColorConsole is an NPM package")
colorconsole.log("Available at https://www.npmjs.com/package/@hasinhayder/colorconsole")
colorconsole.log("Github Repo: https://github.com/hasinhayder/colorconsole")
colorconsole.error("Sample Error Message")
colorconsole.log("Isn't this beautiful?")
colorconsole.log("Check github repo url for the documentation")
colorconsole.custom("Make your own style", "red", "#fff", 20, 5)
```# Use In Browser
```html
colorconsole.success("ColorConsole is Working")
colorconsole.log("A Simple Message, just like console.log()")
colorconsole.warning("This is a warning")
colorconsole.info("ColorConsole is an NPM package")
colorconsole.log("Available at https://www.npmjs.com/package/@hasinhayder/colorconsole")
colorconsole.log("Github Repo: https://github.com/hasinhayder/colorconsole")
colorconsole.error("Sample Error Message")
colorconsole.log("Isn't this beautiful?")
colorconsole.log("Check github repo url for the documentation")
colorconsole.custom("Make your own style", "red", "#fff", 20, 5)```