{"id":26763717,"url":"https://github.com/dreamyguy/console-log-plus","last_synced_at":"2025-07-16T21:33:58.529Z","repository":{"id":35136169,"uuid":"190906054","full_name":"dreamyguy/console-log-plus","owner":"dreamyguy","description":"💬🌈😍 Bring meaningful prefixes and colors to your console log","archived":false,"fork":false,"pushed_at":"2023-01-07T06:12:07.000Z","size":1396,"stargazers_count":8,"open_issues_count":19,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-13T07:27:43.393Z","etag":null,"topics":["console-color","console-customization","console-log","console-visualization"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/console-log-plus","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamyguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-08T15:47:56.000Z","updated_at":"2021-07-29T01:12:56.000Z","dependencies_parsed_at":"2023-01-15T14:33:27.883Z","dependency_job_id":null,"html_url":"https://github.com/dreamyguy/console-log-plus","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dreamyguy/console-log-plus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamyguy%2Fconsole-log-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamyguy%2Fconsole-log-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamyguy%2Fconsole-log-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamyguy%2Fconsole-log-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamyguy","download_url":"https://codeload.github.com/dreamyguy/console-log-plus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamyguy%2Fconsole-log-plus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265542221,"owners_count":23785184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console-color","console-customization","console-log","console-visualization"],"created_at":"2025-03-28T19:34:36.229Z","updated_at":"2025-07-16T21:33:58.499Z","avatar_url":"https://github.com/dreamyguy.png","language":"JavaScript","readme":"# Console Log Plus\n\n\u003e 💬🌈😍 Bring meaningful prefixes and colors to your console log\n\n[![Node Version](https://img.shields.io/badge/node-v12.4.0-brightgreen.svg)](https://github.com/nodejs/node/releases/tag/v12.4.0)\n[![NPM Version](https://img.shields.io/badge/npm-v6.9.0-brightgreen.svg)](https://github.com/npm/cli/releases/tag/v6.9.0)\n[![MIT Licence](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dreamyguy/console-log-plus/blob/master/LICENSE)\n\n`console.log` is a very useful tool in web development. It lets us know what we do have and gives us hints of what we need. But important information can get overseen in the midst of all that noise.\n\nMeaninful prefixes and color-coded messages can come a long way in helping us scan through our log.\n\n**Console Log Plus** - _or `clp` as the function is called_ - gives us both. It also gives us the convenience of 6 optional types, which we _can_ use if we want to:\n\n- `ok` - white on purple\n- `info` - black on light blue\n- `error` - white on red\n- `warning` - white on orange\n- `attention` - black on yellow\n- `success` - black on green\n- `default` - black on white\n\n# Usage\n\nAs with any node module, first you'll have to import it with `require`:\n\n```javascript\nvar clp = require('console-log-plus');\n```\n\n...or through `import`:\n\n```javascript\nimport clp from 'console-log-plus';\n```\n\n**Custom prefixes, with types**\n\n![Variation-1](https://raw.githubusercontent.com/dreamyguy/console-log-plus/master/docs/clp_custom-prefixes-with-types.png \"Custom prefixes, with types\")\n\n```javascript\nclp({\n  type: 'ok',\n  prefix: 'Okay',\n  message: 'you bet'\n});\nclp({\n  type: 'error',\n  prefix: 'Ouch',\n  message: 'you bet'\n});\nclp({\n  type: 'warning',\n  prefix: 'I told you',\n  message: 'you bet'\n});\nclp({\n  type: 'attention',\n  prefix: 'Watch it!',\n  message: 'you bet'\n});\nclp({\n  type: 'success',\n  prefix: 'Awesome!',\n  message: 'you bet'\n});\nclp({\n  type: 'info',\n  prefix: 'FYI',\n  message: 'you bet'\n});\nclp({\n  type: 'default',\n  prefix: 'No fun',\n  message: 'you bet'\n});\n```\n\n**No prefixes, with types**\n\n![Variation-2](https://raw.githubusercontent.com/dreamyguy/console-log-plus/master/docs/clp_no-prefixes-with-types.png \"No prefixes, with types\")\n\n```javascript\nclp({\n  type: 'ok',\n  message: 'you bet'\n});\nclp({\n  type: 'error',\n  message: 'you bet'\n});\nclp({\n  type: 'warning',\n  message: 'you bet'\n});\nclp({\n  type: 'attention',\n  message: 'you bet'\n});\nclp({\n  type: 'success',\n  message: 'you bet'\n});\nclp({\n  type: 'info',\n  message: 'you bet'\n});\nclp({\n  type: 'default',\n  message: 'you bet'\n});\n```\n\n**With prefixes, no types, custom colors**\n\n![Variation-3](https://raw.githubusercontent.com/dreamyguy/console-log-plus/master/docs/clp_with-prefixes-no-types-custom-colors.png \"With prefixes, no types, custom colors\")\n\n```javascript\nclp({\n  prefix: 'Okay',\n  color: 'yellow',\n  background: '#f012be',\n  message: 'you bet'\n});\nclp({\n  prefix: 'Ouch',\n  color: 'yellow',\n  background: '#b10dc9',\n  message: 'you bet'\n});\nclp({\n  prefix: 'I told you',\n  color: 'yellow',\n  background: '#85144b',\n  message: 'you bet'\n});\nclp({\n  prefix: 'Watch it!',\n  color: 'yellow',\n  background: '#89326f',\n  message: 'you bet'\n});\nclp({\n  prefix: 'Awesome!',\n  color: 'yellow',\n  background: 'green',\n  message: 'you bet'\n});\nclp({\n  prefix: 'FYI',\n  color: 'yellow',\n  background: '#ff4136',\n  message: 'you bet'\n});\nclp({\n  prefix: 'No fun',\n  color: 'yellow',\n  background: '#4d1e40',\n  message: 'you bet'\n});\n```\n\n**No prefixes, no types, custom colors**\n\n![Variation-4](https://raw.githubusercontent.com/dreamyguy/console-log-plus/master/docs/clp_no-prefixes-no-types-custom-colors.png \"No prefixes, no types, custom colors\")\n\n```javascript\nclp({\n  color: 'yellow',\n  background: '#ff4136',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: '#f012be',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: '#b10dc9',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: '#85144b',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: 'green',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: '#89326f',\n  message: 'you bet'\n});\nclp({\n  color: 'yellow',\n  background: '#4d1e40',\n  message: 'you bet'\n});\n```\n\n# Development\n\n## Getting started\n\nClone this repo locally. You'll need to have [NodeJS][1] installed. Install all dependencies by running:\n\n    npm i\n\n## Run it locally\n\nTo start the app locally, run:\n\n    npm run dev\n\nThis command fires up the application on port `9887`, making it visible on http://localhost:9887.\n\nEvery time you make changes to [src/index.js][3], your page will refresh and reflect the changes.\n\n_This is only meant as a way to debug the function in the browser, and is only available in `development` mode_.\n\n## Building for production\n\nWhen you're done with your changes, run:\n\n     npm run build\n\nThis command compiles the production-optimised `javascript` to `dist/index.js`, a file compiled out of [src/index.js][3].\n\n**Deploy to NPM**\n\n    npm run deploy\n\n\u003e ⚠️ Make sure to bump version before releasing!\n\n## Good to know\n\n### License\n\n[MIT](LICENSE)\n\n### About\n\n**Console Log Plus** was put together by [Wallace Sidhrée][1]. 👨‍💻🇳🇴\n\n  [1]: http://sidhree.com/\n  [2]: https://nodejs.org/\n  [3]: https://github.com/dreamyguy/console-log-plus/blob/master/src/index.js\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamyguy%2Fconsole-log-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamyguy%2Fconsole-log-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamyguy%2Fconsole-log-plus/lists"}