My first attempt was to use the default export... default exports are widespread, but controversial, so fine. Then I saw the real default export is say... okay, so I passed a string to it... no cigar.
On a Migration to typescript, this should be rolled in.
> require('cowsay').say('JavaScript FTW!')
Uncaught TypeError: Cannot read property 'join' of undefined
at doIt (/sandbox/node_modules/cowsay/index.js:149:51)
at Object.exports.say (/sandbox/node_modules/cowsay/index.js:57:9)
> require('cowsay').say({ text: 'JavaScript FTW!' })
' _________________\n' +
'< JavaScript FTW! >\n' +
' -----------------\n' +
' \\ ^__^\n' +
' \\ (oo)\\_______\n' +
' (__)\\ )\\/\\\n' +
' ||----w |\n' +
' || ||'
>
My first attempt was to use the default export... default exports are widespread, but controversial, so fine. Then I saw the real default export is say... okay, so I passed a string to it... no cigar.
On a Migration to typescript, this should be rolled in.