We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7a07053 + 4d1bc5e commit 3dad58aCopy full SHA for 3dad58a
1 file changed
api/1.0/api.js
@@ -93,7 +93,7 @@ Generator.prototype.generate = function(cb) {
93
}
94
inject = injects[version][nat];
95
96
- this.include('gender', this.gender === null ? randomItem(['male', 'female']) : this.gender);
+ current.gender = this.gender === null ? randomItem(['male', 'female']) : this.gender;
97
98
var name = this.randomName(current.gender, nat);
99
this.include('name', {
@@ -142,6 +142,11 @@ Generator.prototype.generate = function(cb) {
142
143
this.include('nat', nat);
144
145
+ // Gender hack - Remove gender if the user doesn't want it in the results
146
+ if (this.inc.indexOf('gender') === -1) {
147
+ delete current.gender;
148
+ }
149
+
150
output.push(current);
151
152
0 commit comments