________________________
< Use yodasay, you will. >
------------------------
\
\
.--.
\`--._,'.::.`._.--'/
. ` __::__ ' .
-:.`'..`'.:-
\ `--' /
----
yodasay is a talking yoda (plus other Star Wars characters)!
This project is a fork of https://github.com/piuccio/cowsay. The ASCII art was taken from Christopher Johnson's website.
npm i -g yodasay
yodasay JavaScript FTW!
or
yodathink Node.js is cool
It acts in the same way as cowsay, so consult yodasay(1)
or run yodasay -h
.
TIP: Pipe the output through lolcatjs for an awesome effect.
yodasay can be used as any other npm dependency
var yodasay = require('yodasay');
console.log(yodasay.say({
text : 'Use yodasay, you will.'
}));
// or yodasay.think()
echo please repeat | yodasay
yodasay works in your browser too with rollup / webpack / browserify / you name it.
import { say } from 'yodasay';
console.log(say({ text: 'meditating in the browser' }));
You can customize the character by importing the relevant one
import { think, R2D2 } from 'yodasay';
console.log(think({
text: 'meditating in the browser',
cow: R2D2,
eyes: 'pp',
tongue: ';;'
}));
All characters are included in the bundle, but you can use rollup / webpack tree-shake feature to reduce the final bundle size.
say({
text: 'hello',
cow: '', // Template for a character, get inspiration from `./cows`
wrap: false, // If it is specified, the given message will not be word-wrapped. equivalent to yodasay -n
wrapLength: 40, // Specifies roughly where the message should be wrapped. equivalent to yodasay -W
mode: 'b', // One of "b", "d", "g", "p", "s", "t", "w", "y"
});