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.1 to 1.1.2

cows/doge.cow

27

lib/replacer.js
module.exports = function (cow, variables) {
var eyes = escapeRe(variables.eyes);
var tongue = escapeRe(variables.tongue);
if (cow.indexOf("$the_cow") !== -1) {

@@ -8,7 +11,23 @@ cow = extractTheCow(cow);

.replace(/\$thoughts/g, variables.thoughts)
.replace(/\$eyes/g, variables.eyes)
.replace(/\$tongue/g, variables.tongue)
.replace(/\$\{eyes\}/g, variables.eyes)
.replace(/\$\{tongue\}/g, variables.tongue)
.replace(/\$eyes/g, eyes)
.replace(/\$tongue/g, tongue)
.replace(/\$\{eyes\}/g, eyes)
.replace(/\$\{tongue\}/g, tongue)
;
};
/*
* "$" dollar signs must be doubled before being used in a regex replace
* This can occur in eyes or tongue.
* For example:
*
* cowsay -g Moo!
*
* cowsay -e "\$\$" Moo!
*/
function escapeRe (s) {
if (s && s.replace) {
return s.replace(/\$/g, "$$$$");
}
return s;
}

@@ -15,0 +34,0 @@

7

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

@@ -32,9 +32,8 @@ "keywords": [

"dependencies": {
"get-stdin": "^4.0.1",
"optimist": "~0.3.5"
"optimist": "~0.6.1"
},
"devDependencies": {
"nodeunit": "~0.7.4"
"nodeunit": "~0.9.1"
},
"preferGlobal": true
}

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