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 phone number generator #79

Closed
lucapette opened this issue Oct 31, 2022 · 5 comments
Closed

Add phone number generator #79

lucapette opened this issue Oct 31, 2022 · 5 comments
Assignees
Labels

Comments

@lucapette
Copy link
Owner

https://en.wikipedia.org/wiki/E.164

@ShivamJoker
Copy link

I also want this :)

@lucapette
Copy link
Owner Author

@ShivamJoker good to hear! Makes me want to build it faster :)

I didn't get to this yet as I'm not sure too sure about the UI of the command. What I thought we'd do is something like:

$ fakedata phone
# generates international numbers from all countries 
$ fakedata phone.[two digit country code]
# generates numbers for a specific country

Did you have something else in mind?

@ShivamJoker
Copy link

ShivamJoker commented Nov 17, 2022

This looks good but it would be great if we could also have a phone number without the country code, something like

fakedata phone.local[no. of digits]

I am not sure how it will work though we can have some arguments like --no-seprator

Example:

999 999 7774

@lucapette
Copy link
Owner Author

ah! Nice :) I didn't think about the fakedata phone.local option. To control the number of digits, we'd use "constraints" like we do for int for example.

So it would look like this:

$ fakedata phone.local:9
# 9-digit numbers

I don't love the syntax (nor the naming "constraints", probably a simple "options" would do) but it's a little tricky to come up with something better (taking into account generators can repeat makes it tricky). I have some notes for a "fakedata 2.0" issues but didn't get around to share it yet. Soon!

@lucapette lucapette self-assigned this Nov 17, 2022
lucapette added a commit that referenced this issue Nov 17, 2022
@lucapette
Copy link
Owner Author

released in 1.5 🎉

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

No branches or pull requests

2 participants