Skip to content

Commit

Permalink
feat(core): Expose getSupportedRegions also.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-findlay authored and grantila committed Jul 25, 2019
1 parent 661bd34 commit e28e191
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ declare namespace AwesomePhonenumber
static getCountryCodeForRegionCode( regionCode: string ): number;
static getRegionCodeForCountryCode( countryCode: number ): string;
static getSupportedCallingCodes( ): string[ ];
static getSupportedRegionCodes( ): string[ ];
static getExample( regionCode: string, type?: PhoneNumberTypes ): PhoneNumber;
static getAsYouType( regionCode: string ): AsYouType;
}
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ PhoneNumber.getRegionCodeForCountryCode = function( countryCode )
return regionCode;
}

PhoneNumber.getSupportedRegionCodes = function( )
{
return phoneUtil.getSupportedRegions( );
}

PhoneNumber.getSupportedCallingCodes = function( )
{
return phoneUtil.getSupportedCallingCodes( );
Expand Down

0 comments on commit e28e191

Please sign in to comment.