libphonenumber-js
Advanced tools
Comparing version 1.9.27 to 1.9.28
@@ -17,3 +17,4 @@ // `/custom` export is deprecated. | ||
NumberType, | ||
NumberFormat | ||
NumberFormat, | ||
NumberingPlan | ||
} from './types'; | ||
@@ -43,3 +44,4 @@ | ||
NumberFormat, | ||
NumberType | ||
NumberType, | ||
NumberingPlan | ||
}; | ||
@@ -160,2 +162,13 @@ | ||
isValid(): boolean; | ||
} | ||
export class Metadata { | ||
constructor(metadata: MetadataJson); | ||
selectNumberingPlan(country: CountryCode): void; | ||
// The `numberingPlan` property is declared without a `?` | ||
// just so that TypeScript programmers don't have to add | ||
// a needless `if (metadata.numberingPlan)` check: | ||
// the `numberingPlan` property is only set after | ||
// `selectNumberingPlan(country)` method has been called. | ||
numberingPlan: NumberingPlan; | ||
} |
@@ -164,3 +164,3 @@ import { | ||
export class Metadata { | ||
constructor(metadata: MetadataJson); | ||
constructor(); | ||
selectNumberingPlan(country: CountryCode): void; | ||
@@ -167,0 +167,0 @@ // The `numberingPlan` property is declared without a `?` |
@@ -96,3 +96,3 @@ import { | ||
export class Metadata { | ||
constructor(metadata: MetadataJson); | ||
constructor(); | ||
selectNumberingPlan(country: CountryCode): void; | ||
@@ -99,0 +99,0 @@ // The `numberingPlan` property is declared without a `?` |
{ | ||
"name": "libphonenumber-js", | ||
"version": "1.9.27", | ||
"version": "1.9.28", | ||
"description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.common.js", |
@@ -23,2 +23,6 @@ // The rationale for having a separate `CountryCode` type instead of just a `string`: | ||
// } | ||
// | ||
// `in` operator docs: | ||
// https://www.typescriptlang.org/docs/handbook/advanced-types.html#mapped-types | ||
// `country in CountryCode` means "for each and every CountryCode". | ||
[country in CountryCode]: any[]; | ||
@@ -25,0 +29,0 @@ }; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6368702
669
31671
1705