{"id":20114601,"url":"https://github.com/alienzhou/yoo-hoo","last_synced_at":"2025-05-06T13:32:04.192Z","repository":{"id":49997625,"uuid":"315001564","full_name":"alienzhou/yoo-hoo","owner":"alienzhou","description":"ASCII Art for printing a noticeable banner of words for your project. 🖨️","archived":false,"fork":false,"pushed_at":"2021-06-06T13:28:50.000Z","size":152,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T21:20:20.270Z","etag":null,"topics":["ascii-art","banner","characters","cli","console","printer"],"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/alienzhou.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T09:30:04.000Z","updated_at":"2024-03-31T17:18:18.000Z","dependencies_parsed_at":"2022-09-10T14:01:53.752Z","dependency_job_id":null,"html_url":"https://github.com/alienzhou/yoo-hoo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fyoo-hoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fyoo-hoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fyoo-hoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alienzhou%2Fyoo-hoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alienzhou","download_url":"https://codeload.github.com/alienzhou/yoo-hoo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252693615,"owners_count":21789724,"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":["ascii-art","banner","characters","cli","console","printer"],"created_at":"2024-11-13T18:30:44.077Z","updated_at":"2025-05-06T13:31:59.184Z","avatar_url":"https://github.com/alienzhou.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yoo-Hoo\n\nYoo-Hoo! It's a tiny library for printing a noticeable banner of words for your project. Such as below,\n\n![yoo-hoo logo](img/logo.png)\n\nMaybe useful when you want a banner for your project. Have fun!\n\n---\n\n## How to install\n\n```bash\nnpm i yoo-hoo\n```\n\n## How to use\n\n```js\nimport { yo } from 'yoo-hoo';\n\nyo('GOOD');\n```\n\nor in commonjs\n\n```js\nconst { yo } = require('yoo-hoo');\n\nyo('GOOD');\n```\n\n## API\n\n```typescript\nyo(text: string, options?: Option): string[]\n```\n\nIt will return the lines for printing. Then you can print it yourself line by line.\n\n**Options:**\n\n- fontFamily: `object` Specify the font family. Optional. See more in the [Built-In Fonts Section](#built-in-fonts).\n- spacing: `number`  The number of spaces between two characters. Default `1`.\n- paddingStart: `number`  The number of spaces before the text. Default `0`.\n- maxLineWidth: `number`  The max length of lines. If exceed `maxLineWidth` following characters will get a line feed. Default `Infinity`.\n- color: `string`  Setting the color for print. Default `none`. There contains several values:\n  - `random` choosing a random color from the palette\n  - `rainbow` printing rainbow fonts 🌈\n  - `none` without color setting\n  - any other color string supported by [chalk](https://github.com/chalk/chalk)\n- silent: `boolean`  Whether to prevent print characters when calling `yo()`. Default `false`.\n\nFor example,\n\n```typescript\nyo('ho', {\n  color: 'blue',\n  spacing: 2,\n});\n```\n\nThen it will print a blue `HO` with two spaces between H and O.\n\n## Built-In Fonts\n\nBelow is the fonts supported for the `fontFamily` option:\n\n- default\n- anis-shadow\n- big\n- crazy\n- whimsy\n\nYou can import font sets from `lib/fonts/xxx` and use it. Such as below:\n\n```typescript\nimport * as fontFamily from 'yoo-hoo/lib/fonts/ansi-shadow';\n\nyo('yoo-hoo', {\n    fontFamily,\n});\n```\n\nWhen not receiving a `fontFamily` object, it will use the default font set.\n\n## Characters Supported\n\n\u003e 🤘 `yoo-hoo` can be used in **both NodeJS and browsers**.\n\n- 26 letters: `A-Z` (letters will be converted to uppercase)\n- 10 numbers: `0-9`\n- some punctuations: `·` `*` `-` `|`\n\nCharacters that are not supported will be ignored.\n\n## Run the example\n\n```bash\nnpm run example\n```\n\n```text\n /\\\\\\    /\\\\\\  /\\\\\\\\\\\\\\\\      /\\\\\\\\\\\\\\\\                /\\\\\\    /\\\\\\    /\\\\\\\\\\\\\\\\      /\\\\\\\\\\\\\\\\\n \\/\\\\\\   /\\\\\\ /\\\\\\_____/\\\\\\  /\\\\\\_____/\\\\\\             \\/\\\\\\   \\/\\\\\\  /\\\\\\_____/\\\\\\  /\\\\\\_____/\\\\\\\n   \\/_\\\\\\/\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\             \\/\\\\\\   \\/\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\\n      \\/_\\\\\\\\  \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\  /\\\\\\\\\\\\\\\\\\ \\/\\\\\\\\\\\\\\\\\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\\n         \\/\\\\\\  \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/_______/  \\/\\\\\\____/\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\\n          \\/\\\\\\  \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\             \\/\\\\\\   \\/\\\\\\ \\/\\\\\\    \\/\\\\\\ \\/\\\\\\    \\/\\\\\\\n           \\/\\\\\\  \\/_/\\\\\\\\\\\\\\\\\\  \\/_/\\\\\\\\\\\\\\\\\\              \\/\\\\\\   \\/\\\\\\ \\/_/\\\\\\\\\\\\\\\\\\  \\/_/\\\\\\\\\\\\\\\\\\\n            \\/_/     \\/_______/     \\/_______/               \\/_/    \\/_/    \\/_______/     \\/_______/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienzhou%2Fyoo-hoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falienzhou%2Fyoo-hoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienzhou%2Fyoo-hoo/lists"}