
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Modernized version of cowsay
This borrows from https://github.com/piuccio/cowsay. The cow files are the same content but instead of Perl heredoc text files they're ES6 template literals.
const and let instead of var, as you might see on the Google
or airbnb JS style guides.See test/example.js for examples, but the basic usage is:
cowsay.say('What you want to say');
Or pass some options:
cowsay.say('Did you hear someting?', { mode: 'paranoid' });
cowsay.say('A quick brown fox jumped over the lazy dog', { W: 15 });
cowsay.think('I\'m looking sideways', { e: 'cc' });
Get a demo of all available cows with node test/cows.js, and get a demo of all
available modes with node test/modes.js. Get a general test demonstrating line wrapping
and whitespace handling at node test/example.js.
The above examples use the default cow file. You can import other cows and pass them in
on the cow option. Do that one of two ways.
Import all cows, like:
let cows = require('cowsay2/cows');
cowsay('Gobble gobble', { cow: cows.turkey });
Or just import the cow you need (better for client-side bundles):
let cow = require('cowsay2/turkey');
cowsay('Gobble gobble', { cow });
n or nowrap: Don't do any line wrapping beyond whatever newlines occur in the provided textW: Number of columns to wrap at (defaults to 40)See some live example on RunKit at https://runkit.com/johnnysprinkles/5e28a5470e860e001a25123f
console.log(cowsay('hi'));
____
< hi >
----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
console.log(cowsay.say("The static String.raw() method is a tag function of template literals. This is similar to the r prefix in Python, or the @ prefix in C# for string literals. (But it is not identical; see explanations in this issue.) It's used to get the raw string form of template strings, that is, substitutions (e.g. \${foo}) are processed, but escapes (e.g. \n) are not."));
__________________________________________
/ The static String.raw() method is a tag \
| function of template literals. This is |
| similar to the r prefix in Python, or |
| the @ prefix in C# for string literals. |
| (But it is not identical; see |
| explanations in this issue.) It's used |
| to get the raw string form of template |
| strings, that is, substitutions (e.g. |
| ${foo}) are processed, but escapes (e.g. |
\ ) are not. /
------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
const whale = require('./cows/whale');
console.log(cowsay.say('Moo', { cow: whale }));
_____
< Moo >
-----
\
\
\
'-.
.---._ \ .--'
/ `-..__) ,-'
| 0 /
--.__, .__.,`
`-.___'._\_.'
FAQs
cowsay is a configurable talking cow
We found that cowsay2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.