Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Support string as a parameter to say #76

Open
FossPrime opened this issue Sep 30, 2021 · 0 comments
Open

[FR] Support string as a parameter to say #76

FossPrime opened this issue Sep 30, 2021 · 0 comments

Comments

@FossPrime
Copy link

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' +
  '                ||     ||'
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant