{"id":26924494,"url":"https://github.com/yukiniro/comelog","last_synced_at":"2025-08-26T15:19:10.022Z","repository":{"id":57685453,"uuid":"489915303","full_name":"Yukiniro/comelog","owner":"Yukiniro","description":"🎨  Comely style logs for the browser.","archived":false,"fork":false,"pushed_at":"2025-08-19T16:40:20.000Z","size":389,"stargazers_count":3,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T18:39:16.626Z","etag":null,"topics":["chalk","comely","console","log","style"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yukiniro.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-08T10:45:38.000Z","updated_at":"2024-01-12T18:30:20.000Z","dependencies_parsed_at":"2023-12-06T03:03:44.254Z","dependency_job_id":"eca3de5e-815f-450d-a1d1-7fe6949601a1","html_url":"https://github.com/Yukiniro/comelog","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":0.2954545454545454,"last_synced_commit":"081748803917566b09f262c38ebe222c44354138"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Yukiniro/comelog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fcomelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fcomelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fcomelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fcomelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukiniro","download_url":"https://codeload.github.com/Yukiniro/comelog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukiniro%2Fcomelog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272233402,"owners_count":24896806,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chalk","comely","console","log","style"],"created_at":"2025-04-02T01:54:19.117Z","updated_at":"2025-08-26T15:19:09.989Z","avatar_url":"https://github.com/Yukiniro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# comelog\r\n\r\n![NPM](https://img.shields.io/npm/l/comelog?color=blue\u0026style=flat-square) ![npm](https://img.shields.io/npm/v/comelog?color=blue\u0026style=flat-square)\r\n\r\nComely style logs for the browser.\r\n\r\n![log](./public/image/log.png)\r\n\r\n# Features\r\n\r\n- 🚀 Flexible API\r\n- 🌈 Beutifal style\r\n- 🦄 Tiny and no dependencies\r\n- ✨ Support css style\r\n\r\n# Install\r\n\r\n```shell\r\nnpm i comelog -D\r\n```\r\n\r\nor\r\n\r\n```shell\r\npnpm add comelog -D\r\n```\r\n\r\n# Basic Use\r\n\r\n```javascript\r\nimport { comelog } from \"comelog\";\r\n\r\ncomelog.bold().red().flush(\"hello world\");\r\ncomelog.bgOrange().text(\"bk orange\").underline().flush(\"undeline\");\r\n```\r\n\r\n# API\r\n\r\nChain styles to use for the string argument with text or flush function. The next to each other style function will be merged. For example, `comelog.red().bold().text(\"value 1\").bgRed().flush(\"value 2\")` will print `value 1` with red and bold style. And the `value 2` has red background.\r\n\r\nThe `flush` must appear last in the chain.\r\n\r\nComelog supports some preset API. `info`, `warn`, and `error` are easy to use. And these APIs must appear last in the chain because they invoke the `flush` API.\r\n\r\n## `info`\r\n\r\n```js\r\ncomelog.info(\"I am info.\");\r\n```\r\n\r\n![info.png](/public/image/info.png)\r\n\r\n## `warn`\r\n\r\n```js\r\ncomelog.info(\"I am warn.\");\r\n```\r\n\r\n![warn.png](/public/image/warn.png)\r\n\r\n## `error`\r\n\r\n```js\r\ncomelog.info(\"I am error.\");\r\n```\r\n\r\n![error.png](/public/image/error.png)\r\n\r\n## `color`\r\n\r\nThe `color` function will set the color for text.\r\n\r\n```js\r\ncomelog.color(\"#FF0000\").flush(\"Red Color\");\r\n```\r\n\r\n## `bgColor`\r\n\r\nThe `bgColor` function will set the background color for text.\r\n\r\n```js\r\ncomelog.bgColor(\"#FFFFFF\").flush(\"White BG\");\r\n```\r\n\r\n## `text`\r\n\r\nThe `text` function add the message to log.\r\n\r\n```js\r\ncomelog.text(\"text\").flush();\r\n```\r\n\r\n## `log`\r\n\r\nIt is similar to `text`. But `log` will finish the chain and print all message to devtools.\r\n\r\n```js\r\ncomelog.red().flush(\"red log\");\r\n```\r\n\r\n## `flush`\r\n\r\n\u003e This api should only be used by developers. It is recommended to use `log` instead of.\r\n\r\nIt is similar to `log`. But `flush` will return the whole data.\r\n\r\n```js\r\nconst data = comelog.red().flush(\"red flush\");\r\nconsole.log(data);\r\n```\r\n\r\n## `style`\r\n\r\nYou could use `style` function to custom style.\r\n\r\n```js\r\ncomelog.style({ color: \"#FF0000\" }).flush(\"Red Text\");\r\ncomelog.style({ backgroundColor: \"#FFFFFF\" }).flush(\"White BG\");\r\n```\r\n\r\n## Styles\r\n\r\nHere is the preset style api.\r\n\r\n### Colors and Background colors\r\n\r\nThe `comelog` support [css color keywords](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color_keywords) to be the color add bgColor function.\r\n\r\n```js\r\ncomelog.white().bgOrange().flush(\"hello world\");\r\n```\r\n\r\n### Modifiers\r\n\r\n- bold\r\n- italic\r\n- border\r\n- radius\r\n- shadow\r\n- font\r\n- padding\r\n- margin\r\n- capitalize\r\n- uppercase\r\n- lowercase\r\n- spacing\r\n- underline\r\n\r\n```js\r\ncomelog.blod().underline().flush(\"hello world\");\r\ncomelog.lowercase().capitalize().flush(\"hello world\");\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukiniro%2Fcomelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukiniro%2Fcomelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukiniro%2Fcomelog/lists"}