-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
feat(name): add full_name_pattern configuration #1211 #1216
feat(name): add full_name_pattern configuration #1211 #1216
Conversation
Could you please provide the male and female first names in a separate PR? |
Codecov Report
@@ Coverage Diff @@
## main #1216 +/- ##
==========================================
- Coverage 99.62% 99.62% -0.01%
==========================================
Files 2163 2165 +2
Lines 241264 241318 +54
Branches 1014 1028 +14
==========================================
+ Hits 240357 240406 +49
- Misses 886 891 +5
Partials 21 21
|
We have responded here. |
This comment was marked as duplicate.
This comment was marked as duplicate.
The full name pattern isnt used in the code and if it will be it should be done constently for all locales |
In the most recent commit, the full_name_pattern method was abandoned. The name template is located in src/definitions/name.ts.
|
You seem to have missed one file: src/locales/ja/name/full_name_pattern.ts |
@ST-DDT |
In addition to src/definitions/name.ts |
src/modules/name/index.ts
Outdated
return defaultName; | ||
} | ||
|
||
const fullNamePattern = this.faker.helpers.arrayElement( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The selectDefinition method at the top should do the same in a more readable way..
'name.male_last_name': () => | ||
lastName ? lastName : this.lastName('male'), | ||
'name.suffix': () => (suffix ? suffix : this.suffix()), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of this, as this hard to maintain/extend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ST-DDT
Is this an implementation issue?
Or is it an idea problem?
Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would be nice of you could at least remove/merge the male/female parts and then call it with the (pregenerated) gender option.
Or maybe, doing a faker.mustache with the method names, followed by a faker.fake with the locale keys.
Not sure what "feels" best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superseded by #1637 |
No description provided.