fake-identity
fake-identity copied to clipboard
Add the option for all Number phone numbers
For example, simply return "5554441234" instead of "(555) 444-1234"
If this sounds good I can code it up / make tests and submit a PR.
Sounds good. Eventually, I'd like to be able to pass an options object to generate() with options like phone number format, etc.
That's what I was thinking when I initially peeked at the code.
I was thinking when you call generate you can pass it an optional config object after the number, which will have phoneNumber options, etc.
Is that what you had in mind?
generate(config, num);
or
generate(num, config);
or you can do something like this to clean it up, because if you do one of the ways above you have issues when you want 1 number and a config.
generate() -- default 1 with default config
generate(config);
config = {
num: Number,
phoneNumber: String,
etc,
etc
};
Ideally, I'd like generate(config, num)
, and if the first argument is a number instead of an object, it just acts as generate(num)
.