Socket
Socket
Sign inDemoInstall

cowsay

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cowsay - npm Package Compare versions

Comparing version 1.1.9 to 1.2.0

build/cowsay.es.js

10

lib/balloon.js

@@ -1,5 +0,3 @@

var os = require("os");
exports.say = function (text, wrap) {
delimiters = {
var delimiters = {
first : ["/", "\\"],

@@ -15,3 +13,3 @@ middle : ["|", "|"],

exports.think = function (text, wrap) {
delimiters = {
var delimiters = {
first : ["(", ")"],

@@ -33,3 +31,3 @@ middle : ["(", ")"],

balloon = [
" " + top(maxLength),
" " + top(maxLength),
delimiters.only[0] + " " + lines[0] + " " + delimiters.only[1],

@@ -58,3 +56,3 @@ " " + bottom(maxLength)

return balloon.join("\n"); //os.EOL
return balloon.join("\n");
}

@@ -61,0 +59,0 @@

18

package.json
{
"name": "cowsay",
"version": "1.1.9",
"version": "1.2.0",
"description": "cowsay is a configurable talking cow",

@@ -19,3 +19,6 @@ "keywords": [

},
"license": "MIT",
"main": "./index",
"module": "./build/cowsay.es.js",
"browser": "./build/cowsay.umd.js",
"bin": {

@@ -28,2 +31,3 @@ "cowsay": "./cli.js",

"cli.js",
"build/",
"cows/",

@@ -37,2 +41,3 @@ "lib/"

"scripts": {
"prepublish": "rollup -c",
"test": "node test.js"

@@ -45,5 +50,12 @@ },

"devDependencies": {
"nodeunit": "~0.9.1"
"nodeunit": "~0.11.1",
"rollup": "^0.47.4",
"rollup-plugin-commonjs": "^8.1.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-string": "^2.0.2"
},
"preferGlobal": true
"preferGlobal": true,
"engines": {
"node": ">= 4"
}
}

@@ -40,9 +40,9 @@ # cowsay

.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
````

@@ -78,1 +78,40 @@

echo please repeat | cowsay
## Usage in the browser
cowsay works in your browser too with rollup / webpack / browserify / you name it.
```js
import { say } from 'cowsay';
console.log(say({ text: 'grazing in the browser' }));
```
You can customize the cow by importing the relevant one
```js
import { think, SQUIRREL } from 'cowsay';
console.log(think({
text: 'grazing in the browser',
cow: SQUIRREL,
eyes: 'pp',
tongue: ';;',
}));
```
All cows are included in the bundle, but you can use rollup / webpack tree-shake feature to reduce the final bundle size.
### Browser options
```js
say({
text: 'hello',
cow: '', // Template for a cow, get inspiration from `./cows`
eyes: 'oo', // Select the appearance of the cow's eyes, equivalent to cowsay -e
tongue: 'L|', // The tongue is configurable similarly to the eyes through -T and tongue_string, equivalent to cowsay -T
wrap: false, // If it is specified, the given message will not be word-wrapped. equivalent to cowsay -n
wrapLength: 40, // Specifies roughly where the message should be wrapped. equivalent to cowsay -W
mode: 'b', // One of "b", "d", "g", "p", "s", "t", "w", "y"
});
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc