libphonenumber-js
Advanced tools
Comparing version 1.9.35 to 1.9.36
@@ -78,2 +78,7 @@ "use strict"; | ||
_createClass(PhoneNumber, [{ | ||
key: "setExt", | ||
value: function setExt(ext) { | ||
this.ext = ext; | ||
} | ||
}, { | ||
key: "isPossible", | ||
@@ -80,0 +85,0 @@ value: function isPossible() { |
@@ -70,2 +70,7 @@ <!-- (breaking change) `parsePhoneNumberFromString()`: `extract: false` is now the default mode: non-phone-number characters aren't now trimmed on the left and on the right sides of a phone number. For example, `(213) 373-4253` is parsed as a valid phone number, but `Call: (213) 373-4253` is not, because `Call: ` doesn't automatically get trimmed now. For the old behavior, pass `extract: true` option. --> | ||
1.9.36 / 05.10.2021 | ||
================== | ||
* Added a [`setExt(ext: string)`](https://gitlab.com/catamphetamine/libphonenumber-js/#setextext-string) function of a `PhoneNumber` class instance. It could be useful when formatting phone numbers stored as two separate fields: the phone number itself and the extension part. | ||
1.9.27 / 09.09.2021 | ||
@@ -72,0 +77,0 @@ ================== |
@@ -63,2 +63,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
_createClass(PhoneNumber, [{ | ||
key: "setExt", | ||
value: function setExt(ext) { | ||
this.ext = ext; | ||
} | ||
}, { | ||
key: "isPossible", | ||
@@ -65,0 +70,0 @@ value: function isPossible() { |
{ | ||
"name": "libphonenumber-js", | ||
"version": "1.9.35", | ||
"version": "1.9.36", | ||
"description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.common.js", |
@@ -42,2 +42,6 @@ import Metadata from './metadata' | ||
setExt(ext) { | ||
this.ext = ext | ||
} | ||
isPossible() { | ||
@@ -44,0 +48,0 @@ return isPossibleNumber(this, { v2: true }, this.metadata) |
@@ -77,2 +77,3 @@ // The rationale for having a separate `CountryCode` type instead of just a `string`: | ||
ext?: Extension; | ||
setExt(ext: Extension): void; | ||
isPossible(): boolean; | ||
@@ -79,0 +80,0 @@ isValid(): boolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
6373034
31678
1723