Skip to content

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

Description

@FossPrime

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' +
  '                ||     ||'
>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions