Closed guiliuri13 closed 1 year ago
Hey @guiliuri13, Thanks for your PR!
I revised your PR and...there are interesting commits!
1. [FEATURE] add getMatchingCountry (HASH 1c4ac026c3e71cfcd5415444177c4405d9c8d57b):
export declare function getMatchingCountry(phoneNumber: string): ICountry | undefined;
2. [CONFIG] auth infos (HASH 057abac324b1d077ef51efd5690306aaced28614):
3. [FIX] name pattern (HASH 88e2dea985ceaa24e893f55fdbddd8d8d3dae8c0):
4. [FIX] fix exports (HASH a8fb6eab5fa829cd446d415648e2b4b96c3e7822):
This is a good commit! :)
In file lib/index.js
you must not export getMatchingCountry and phoneMask like this (in your commit):
export { getMatchingCountry } from "./utils/getMatchingCountry"
export { phoneMask } from "./utils/inputMask"
As you did is redundant, because both have already been imported from the appropriate path at the beginning of the file. So, export only as follows:
export { getMatchingCountry, phoneMask}
And you need to improve the typescript to the function getMatchingCountry in declare file, too. The correct would be:
export declare function phoneMask(value: string, countryCode: string, cca2?: string): string;
The rest is okay!
So, could you re-PR this, without the bad commit and with the required adjustments?
🚀AstrOOnauta 🚀
Of course, I'll tidy up your notes and make another pull request as soon as possible. I still hope to modify a good part of the architecture, hence the fork. I will always keep you with the credits! Thanks
Exported the function to get the country code by number.