Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The yosay npm package is a fun utility that allows you to display messages in a speech bubble format, similar to the classic 'cowsay' but with a character resembling Yeoman. It's often used to add a bit of humor or personality to command-line interfaces.
Basic Message Display
This feature allows you to display a basic message in a speech bubble format. The code sample shows how to require the yosay package and use it to print 'Hello, world!' in a speech bubble.
const yosay = require('yosay');
console.log(yosay('Hello, world!'));
Multiline Message Display
This feature allows you to display multiline messages. The code sample demonstrates how to print a message that spans multiple lines in a speech bubble.
const yosay = require('yosay');
console.log(yosay('Hello, world!
This is a multiline message.'));
Customizing the Character
This feature allows you to customize the speech bubble, such as setting a maximum length for the message. The code sample shows how to limit the message length to 20 characters.
const yosay = require('yosay');
console.log(yosay('Hello, world!', { maxLength: 20 }));
The cowsay package is a popular alternative that displays messages in a speech bubble with an ASCII art cow. It offers various customization options, including different characters and speech bubble styles. Compared to yosay, cowsay has a wider range of characters and is more widely known.
The figlet package allows you to create text banners in various ASCII art fonts. While it doesn't provide speech bubbles, it is often used to add stylized text to command-line interfaces. Figlet focuses more on text art rather than character-based speech bubbles like yosay.
The cli-boxes package provides box-drawing characters for creating boxes in the terminal. It doesn't offer speech bubbles or characters, but it can be used to create custom box designs around text. This package is more about creating structured layouts rather than adding personality to messages.
Tell Yeoman what to say
Like cowsay, but less cow.
$ npm install --save yosay
var yosay = require('yosay');
console.log(yosay('Hello, and welcome to my fantastic generator full of whimsy and bubble gum!'));
/*
_-----_
| | .--------------------------.
|--(o)--| | Hello, and welcome to my |
`---------´ | fantastic generator full |
( _´U`_ ) | of whimsy and bubble |
/___A___\ | gum! |
| ~ | '--------------------------'
__'.___.'__
´ ` |° ´ Y `
*/
You can style your text with chalk before passing it to yosay
.
$ npm install --global yosay
$ yosay --help
Usage
yosay <string>
yosay <string> --maxLength 8
echo <string> | yosay
Example
yosay 'Sindre is a horse'
_-----_
| | .--------------------------.
|--(o)--| | Sindre is a horse |
`---------´ '--------------------------'
( _´U`_ )
/___A___\
| ~ |
__'.___.'__
´ ` |° ´ Y `
BSD license Copyright (c) Google
FAQs
Tell Yeoman what to say
The npm package yosay receives a total of 317,671 weekly downloads. As such, yosay popularity was classified as popular.
We found that yosay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.