-
-
Notifications
You must be signed in to change notification settings - Fork 880
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 exclude emoji #2623
Comments
Thank you for your feature proposal. We marked it as "waiting for user interest" for now to gather some feedback from our community:
We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements. We will start the implementation based on:
We do this because:
|
Could you please explain what exactly bothers you with the emojis (just so we understand what exactly we have to implement/change)? Please remember to upvote your own feature request😉 |
Currently using faker to generate medium to long phrases of text (fake LLM promps) and the emojis stand out, visually.
My preference is plain text, but I think others may like the option for emoji text / ASCII. In which case the former suggestion might be better off: faker.person.bio({ emoji: '...' })
type BioOptions = {
emoji?: 'unicode' | 'text' | 'ascii' | 'none' | false // etc
} |
Maybe a helper function which strips emojis, or non ascii text would be more genetically useful than adding a parameter to this method specifically? |
May you explain how a second, separate method can be more generic than making the signature allow options that customize the output? Allowing custom output by parameters is literally the most generic option there is. Might nit be the best in terms of DX, but I don't see where you come from with your argument and want to understand it. |
Because other methods might emit emoji or non ascii characters, not just this one. |
I'm not sure about removing certain things from our strings or providing a separate method for that. I think having a parameter is different because we could control which parts we would like to add to the output, but I'm not even sure I would like to do that. (Only if there is community interest for it) As a workaround you could strip the emojis from the patterns: faker.rawDefintions.person.bio_pattern = faker.rawDefintions.person.bio_pattern.map((v) => v.replaceAll("{{internet.emoji}}", ""); |
As another workaround you can easily strip emojis from a string using Unicode property escapes: faker.person.bio().replace(/\p{Emoji}/gu, ''); |
Clear and concise description of the problem
Please add an option to exclude emojis in
faker.person.bio()
. Would like to avoid having to write a script to remove/replace emojis when they are generated.Suggested solution
Perhaps one of 2 methods (or both):
bio()
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: