A pull request for the faker library
- Keep it PG-13
- No sex, drugs, violence, or racism
Faker::Name.name #=> “Tyshawn Johns Sr.” Faker::Name.name_with_middle #=> “Aditya Elton Douglas” Faker::Name.first_name #=> “Kaci” Faker::Name.last_name #=> “Ernser” Faker::Name.prefix #=> “Mr.” Faker::Name.suffix #=> “IV” Faker::Name.title #=> “Legacy Creative Director”
- Would it be better to store them as arrays based on length (and random from them) or to store them as one array (and use regexes)?
- The most common operation will be random among them.
- The less common ones will be finding a name of a certain length or content
selects from all
selects one with an initial
selects two word combos ^([a-zA-Z.-']+\s?){2}$
selects three word combos
RuntimeError: Faker::FunnyName.name_with_initial has an entropy leak; use “Faker::Config.random.rand” or “Array#sample(random: Faker::Config.random)”. Method to lookup for: sample, shuffle, rand