Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option for all Number phone numbers #3

Open
jhorwit2 opened this issue Sep 23, 2014 · 3 comments
Open

Add the option for all Number phone numbers #3

jhorwit2 opened this issue Sep 23, 2014 · 3 comments

Comments

@jhorwit2
Copy link

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.

@travishorn
Copy link
Owner

Sounds good. Eventually, I'd like to be able to pass an options object to generate() with options like phone number format, etc.

@jhorwit2
Copy link
Author

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
};

@travishorn
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants