New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-cowsay

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cowsay

A react wrapper for cowsay-browser

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

react-cowsay

A react wrapper for cowsay-browser

Usage

<Cowsay>I'm a cow!</Cowsay>

react-cowsay accepts almost all arguments from cowsay as props.

The only exception is f which does not accept a filepath, though any of the included cows can be used.

The options for cowsay are replicated here for convenience:

  -b  Mode: Borg                                                                                                                                  
  -d  Mode: Dead                                                                                                                                  
  -g  Mode: Greedy                                                                                                                                
  -p  Mode: Paranoia                                                                                                                              
  -s  Mode: Stoned                                                                                                                                
  -t  Mode: Tired                                                                                                                                 
  -w  Mode: Wired                                                                                                                                 
  -y  Mode: Youthful                                                                                                                              
  -e  Select the appearance of the cow's eyes.                                                                                                      [default: "oo"]
  -T  The tongue is configurable similarly to the eyes through -T and tongue_string.                                                                [default: "  "]                                                                                                               
  -n  If it is specified, the given message will not be word-wrapped.                                                                             
  -W  Specifies roughly where the message should be wrapped. The default is equivalent to -W 40 i.e. wrap words at or before the 40th column.       [default: 40]
  -f  Specifies a cow picture file (''cowfile'') to use. Use of the named cows included in the package.  [default: "default"]

Additionally text can be specified either as a prop or as children.

<Cowsay>This works</Cowsay>
<Cowsay text="This also works" />

Development

The development environment is already setup and ready to go (hot-loading and linting included!)

  • Build only your library component/components in /src folder (this is what will be published to npm)
  • Rendering for testing/development should be done in /site/src (this can also be used as a static site for examples, docs, etc.)
  • yarn start or npm start

Testing

Tests are written in the /test directory, using Jest, and enzyme

License

MIT

Keywords

react

FAQs

Package last updated on 19 Apr 2017

Did you know?

Socket

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.

Install

Related posts