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

Add option to specify output format #10

Open
ddzz opened this issue Mar 21, 2023 · 1 comment
Open

Add option to specify output format #10

ddzz opened this issue Mar 21, 2023 · 1 comment

Comments

@ddzz
Copy link
Collaborator

ddzz commented Mar 21, 2023

Right now only an array of individual emojis is returned. There should be an option to concatenate these emojis into a single string.

@bmish
Copy link
Owner

bmish commented Mar 21, 2023

Thanks for the suggestion.

I would agree with this suggestion if this was a CLI tool that simply printed the output and the user needed it to be in a convenient format.

However, since this tool is currently just a Node API / function, I think it's fine that we have one specified format that we return data in. The user can easily manipulate the resulting data using JS and turn it into whatever kind of string they need:

(await getEmojis(...)).map(result => result.join(''));

And it's better for us to return the data in separate pieces so that the user doesn't have to do any string parsing to access the individual emoji suggestions.

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

2 participants