Bogus
Bogus copied to clipboard
United Kingdom Extensions: Added NHSNumber generator to Person
NHS numbers at 10 digits long. The last digit is a check digit
Hi. I think we need a unit test for this. Also, is there a way to generate an NHS number without the do/while loop?
Generally, it's a bad/anti-pattern for generators to have a do -> while -> test-if-valid -> do-again-if-not-valid in Bogus.
A better implementation would be a straight one-shot generation of the NHS number after calling the generation method.