Closed pkuczynski closed 2 years ago
Based on this. Is there a reason why each property of options
is checked against typeof prop === 'undefined'
instead of just checking against undefined
itself?
Based on this. Is there a reason why each property of
options
is checked againsttypeof prop === 'undefined'
instead of just checking againstundefined
itself?
Basically just a convention - https://stackoverflow.com/questions/4725603/variable-undefined-vs-typeof-variable-undefined (That way all possible undefined checks look the same)
FFR: https://github.com/faker-js/faker/blob/main/src/datatype.ts#L38
I will provide a pr. Can I get assigned?
Describe the bug
The
faker.datatype.number
mutates theoptions
param.Reproduction
Additional Info
No response