yodasay
yodasay is a configurable talking Star Wars character
Last updated a year ago by scotttesler .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install yodasay -g
SYNC missed versions from official npm registry.

yodasay

 ________________________
< 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.

Install

npm i -g yodasay

Usage

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.

Multi-color Yoda 0 Multi-color Dark Vader 0 Multi-color Dark Vader 1

Usage as a module

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()

Pipe from standard input

echo please repeat | yodasay

Usage in the browser

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.

Browser options

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"
});

Current Tags

  • 1.1.9                                ...           latest (a year ago)

14 Versions

  • 1.1.9                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 15
Dependencies (4)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |