Skip to content

Use word methods in random.word() #129

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

Closed
griest024 opened this issue Jan 13, 2022 · 1 comment · Fixed by #1307
Closed

Use word methods in random.word() #129

griest024 opened this issue Jan 13, 2022 · 1 comment · Fixed by #1307
Labels
m: word Something is referring to the word module s: awaiting more info Additional information are requested

Comments

@griest024
Copy link
Contributor

Clear and concise description of the problem

As a developer, I want random.word() to draw from the entire pool of appropriate words.

Suggested solution

Add the word methods (word.noun, word.verb, etc.) to the pool from which random.word() pulls.

faker/lib/random.js

Lines 150 to 182 in 9506122

var wordMethods = [
'commerce.department',
'commerce.productName',
'commerce.productAdjective',
'commerce.productMaterial',
'commerce.product',
'commerce.color',
'company.catchPhraseAdjective',
'company.catchPhraseDescriptor',
'company.catchPhraseNoun',
'company.bsAdjective',
'company.bsBuzz',
'company.bsNoun',
'address.streetSuffix',
'address.county',
'address.country',
'address.state',
'finance.accountName',
'finance.transactionType',
'finance.currencyName',
'hacker.noun',
'hacker.verb',
'hacker.adjective',
'hacker.ingverb',
'hacker.abbreviation',
'name.jobDescriptor',
'name.jobArea',
'name.jobType',
];

Alternative

These words might be transitively included via some other method, I'm not sure.

Additional context

No response

@Shinigami92
Copy link
Member

Is this related to #276 ?

@ejcheng ejcheng added s: awaiting more info Additional information are requested and removed s: pending triage Pending Triage labels Feb 15, 2022
@xDivisionByZerox xDivisionByZerox added the m: word Something is referring to the word module label Aug 27, 2022
@ST-DDT ST-DDT moved this to Done in Faker Roadmap Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
m: word Something is referring to the word module s: awaiting more info Additional information are requested
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants