{"id":17480394,"url":"https://github.com/litomore/chalk-pipe","last_synced_at":"2025-04-07T12:06:04.599Z","repository":{"id":52813590,"uuid":"101186775","full_name":"LitoMore/chalk-pipe","owner":"LitoMore","description":"🌈 Create chalk style schemes with simpler style strings","archived":false,"fork":false,"pushed_at":"2024-10-07T05:35:28.000Z","size":131,"stargazers_count":33,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T03:28:11.640Z","etag":null,"topics":["chalk","chalk-pipe","scheme"],"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/LitoMore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-08-23T14:02:46.000Z","updated_at":"2024-10-07T05:35:31.000Z","dependencies_parsed_at":"2025-01-07T16:09:29.911Z","dependency_job_id":"b52af6c2-b954-4ece-b766-b40731ab39b4","html_url":"https://github.com/LitoMore/chalk-pipe","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitoMore%2Fchalk-pipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitoMore%2Fchalk-pipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitoMore%2Fchalk-pipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LitoMore%2Fchalk-pipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LitoMore","download_url":"https://codeload.github.com/LitoMore/chalk-pipe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648976,"owners_count":20972945,"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":["chalk","chalk-pipe","scheme"],"created_at":"2024-10-18T21:44:18.040Z","updated_at":"2025-04-07T12:06:04.582Z","avatar_url":"https://github.com/LitoMore.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chalk-pipe\n\n[![](https://github.com/LitoMore/chalk-pipe/workflows/Node/badge.svg)](https://github.com/LitoMore/chalk-pipe/actions)\n[![](https://img.shields.io/npm/v/chalk-pipe.svg)](https://www.npmjs.com/package/chalk-pipe)\n[![](https://img.shields.io/npm/l/chalk-pipe.svg)](https://github.com/LitoMore/chalk-pipe/blob/main/LICENSE)\n[![](https://shields.io/badge/code_style-5ed9c7?logo=xo\u0026labelColor=gray)](https://github.com/xojs/xo)\n\nCreate chalk style schemes with simpler style strings\n\n![](https://raw.githubusercontent.com/LitoMore/chalk-pipe/main/screenshot.png)\n\n## Install\n\n```sh\nnpm install chalk-pipe\n```\n\n## Usage\n\n```js\nimport chalkPipe from 'chalk-pipe';\n\nconsole.log(chalkPipe('blue.bold')('Hello world!'));\n```\n\nUse dot `.` to separeate multiple styles:\n\n```js\nconst link = chalkPipe('blue.underline');\nconst error = chalkPipe('bgRed.#cccccc');\nconst warning = chalkPipe('orange.bold');\n\nconsole.log(link('Link!'));\nconsole.log(error('Error!'));\nconsole.log(warning('Warning!'));\n```\n\n`chalkPipe` is also `chalk`:\n\n```js\nconst blue = chalkPipe('blue');\nconst link = blue.underline;\n\nconsole.log(link('Link!'));\n```\n\n### Use custom chalk\n\n```js\nimport chalkPipe, {chalk, Chalk} from 'chalk-pipe';\n\nconst customChalk = new Chalk({level: 1});\n\nconsole.log(chalkPipe('underline', chalk.blue)('Link!'));\nconsole.log(chalkPipe('underline', customChalk.blue)('Link!'));\n```\n\n## Built-in Chalk\n\nAll Chalk exported functions, variables, and declarations are exposed for convenience.\n\nThis can be useful if you want to use `chalk` directly.\n\n```js\nimport {chalk, Chalk} from 'chalk-pipe';\n\nconst customChalk = new Chalk({level: 0});\n\nconsole.log(chalk.blue('Hello'))\nconsole.log(customChalk.green('World'));\n```\n\n## API\n\n### chalkPipe(styles)(text)\n\nExample:\n\n ```js\n chalkPipe('blue.underline')('Link!');\n ```\n\n### chalkPipe(styles, chalk)(text)\n\nExample:\n\n```js\nimport {Chalk} from 'chalk-pipe';\n\nconst chalk = new Chalk({level: 1});\n\nchalkPipe('underline', chalk.blue)('Link!');\n```\n\n### keywordNames\n\nAll supported keyword names are exposed as array of strings for convenience.\n\n```js\nimport {keywordNames} from 'chalk-pipe';\n\nconsole.log(keywordNames.includes('pink'));\n//=\u003e true\n```\n\n## Supported styles\n\n- [Modifiers](https://github.com/chalk/chalk#modifiers)\n- [Colors](https://github.com/chalk/chalk#colors)\n- [Background colors](https://github.com/chalk/chalk#background-colors)\n- [Hex triplet](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet)\n- [CSS keywords](https://www.w3.org/wiki/CSS/Properties/color/keywords)\n\n## Related\n\n- [chalk-pipe-cli](https://github.com/LitoMore/chalk-pipe-cli) - CLI for this module\n- [ink-color-pipe](https://github.com/LitoMore/ink-color-pipe) - Ink component for this module\n- [inquirer-chalk-pipe](https://github.com/LitoMore/inquirer-chalk-pipe) - A inquirer plugin for input chalk-pipe style strings\n- [chalk](https://github.com/chalk/chalk) - Output colored text to terminal\n\n## License\n\nMIT © [LitoMore](https://github.com/LitoMore)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitomore%2Fchalk-pipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitomore%2Fchalk-pipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitomore%2Fchalk-pipe/lists"}