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 masking for AE ISO2 #155

Open
mamo-muj opened this issue Feb 7, 2024 · 1 comment
Open

Add masking for AE ISO2 #155

mamo-muj opened this issue Feb 7, 2024 · 1 comment

Comments

@mamo-muj
Copy link

mamo-muj commented Feb 7, 2024

Hi there, I was looking at the data and there's some countries that are missing masking for the phone numbers. I'm sure that we have masking for ae country - ... .. ... ...., however, I didn't see that in there. Is there a way that I can extend this and add it myself?

Thank you for all the work on this package! It's been super helpful 🔥

@mamo-muj
Copy link
Author

mamo-muj commented Feb 7, 2024

I tried something like this and this worked. Although if we could add it into the package itself that would be great as well

// Defining the list of ISO2 codes of countries to be excluded
const excludedCountries = ["ae"];

// Filter out excluded countries from the defaultCountries array
const filteredCountries = defaultCountries.filter(country => !excludedCountries.includes(country[1]));

// Add masking for UAE country manually
filteredCountries.push(["United Arab Emirates", "ae", "971", ".. ... ...."]);

// Sort the filteredd countries alphabetcially by country name
filteredCountries.sort((a, b) => a[0].localeCompare(b[0]));

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

1 participant