Socket
Socket
Sign inDemoInstall

libphonenumber-js

Package Overview
Dependencies
Maintainers
1
Versions
392
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libphonenumber-js - npm Package Compare versions

Comparing version 1.7.11 to 1.7.12

source/AsYouType.js

12

core/index.d.ts

@@ -11,2 +11,3 @@ import {

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -29,2 +30,3 @@ NumberType,

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -41,11 +43,11 @@ NumberType,

export function findNumbers(text: string, metadata: Metadata): NumberFound[];
export function findNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata): NumberFound[];
export function findNumbers(text: string, metadata: Metadata): NumberFoundLegacy[];
export function findNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2: true }, metadata: Metadata): NumberFound[];
export function searchNumbers(text: string, metadata: Metadata): IterableIterator<NumberFound>;
export function searchNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata): IterableIterator<NumberFound>;
export function searchNumbers(text: string, metadata: Metadata): IterableIterator<NumberFoundLegacy>;
export function searchNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2: true }, metadata: Metadata): IterableIterator<NumberFound>;
export class PhoneNumberMatcher {
constructor(text: string, metadata: Metadata);
constructor(text: string, options: { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata);
constructor(text: string, options: { defaultCountry?: CountryCode, v2: true }, metadata: Metadata);
hasNext(): boolean;

@@ -52,0 +54,0 @@ next(): NumberFound | undefined;

@@ -14,2 +14,3 @@ // `/custom` export is deprecated.

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -39,2 +40,3 @@ NumberType,

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -89,8 +91,8 @@ NumberFormat,

// Deprecated.
export function findParsedNumbers(text: string, metadata: Metadata): NumberFound[];
export function findParsedNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode }, metadata: Metadata): NumberFound[];
export function findParsedNumbers(text: string, metadata: Metadata): NumberFoundLegacy[];
export function findParsedNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode }, metadata: Metadata): NumberFoundLegacy[];
// Deprecated.
export function searchParsedNumbers(text: string, metadata: Metadata): IterableIterator<NumberFound>;
export function searchParsedNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode }, metadata: Metadata): IterableIterator<NumberFound>;
export function searchParsedNumbers(text: string, metadata: Metadata): IterableIterator<NumberFoundLegacy>;
export function searchParsedNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode }, metadata: Metadata): IterableIterator<NumberFoundLegacy>;

@@ -102,14 +104,14 @@ // Deprecated.

hasNext(): boolean;
next(): NumberFound | undefined;
next(): NumberFoundLegacy | undefined;
}
export function findNumbers(text: string, metadata: Metadata): NumberFound[];
export function findNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata): NumberFound[];
export function findNumbers(text: string, metadata: Metadata): NumberFoundLegacy[];
export function findNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2: true }, metadata: Metadata): NumberFound[];
export function searchNumbers(text: string, metadata: Metadata): IterableIterator<NumberFound>;
export function searchNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata): IterableIterator<NumberFound>;
export function searchNumbers(text: string, metadata: Metadata): IterableIterator<NumberFoundLegacy>;
export function searchNumbers(text: string, options: CountryCode | { defaultCountry?: CountryCode, v2: true }, metadata: Metadata): IterableIterator<NumberFound>;
export class PhoneNumberMatcher {
constructor(text: string, metadata: Metadata);
constructor(text: string, options: { defaultCountry?: CountryCode, v2?: boolean }, metadata: Metadata);
constructor(text: string, options: { defaultCountry?: CountryCode, v2: true }, metadata: Metadata);
hasNext(): boolean;

@@ -116,0 +118,0 @@ next(): NumberFound | undefined;

@@ -15,2 +15,3 @@ // The default export is currently a legacy one.

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -31,2 +32,3 @@ NumberType,

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -99,4 +101,4 @@ NumberFormat,

// Deprecated.
export function findParsedNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode }): NumberFound[];
export function searchParsedNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode }): IterableIterator<NumberFound>;
export function findParsedNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode }): NumberFoundLegacy[];
export function searchParsedNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode }): IterableIterator<NumberFoundLegacy>;

@@ -107,10 +109,13 @@ // Deprecated.

hasNext(): boolean;
next(): NumberFound | undefined;
next(): NumberFoundLegacy | undefined;
}
export function findNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }): NumberFound[];
export function searchNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }): IterableIterator<NumberFound>;
export function findNumbers(text: string, options?: CountryCode): NumberFoundLegacy[];
export function searchNumbers(text: string, options?: CountryCode): IterableIterator<NumberFoundLegacy>;
export function findNumbers(text: string, options?: { defaultCountry?: CountryCode, v2: true }): NumberFound[];
export function searchNumbers(text: string, options?: { defaultCountry?: CountryCode, v2: true }): IterableIterator<NumberFound>;
export class PhoneNumberMatcher {
constructor(text: string, options?: { defaultCountry?: CountryCode, v2?: boolean });
constructor(text: string, options?: { defaultCountry?: CountryCode, v2: true });
hasNext(): boolean;

@@ -117,0 +122,0 @@ next(): NumberFound | undefined;

@@ -10,2 +10,3 @@ import {

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -27,2 +28,3 @@ NumberType,

ParseError,
NumberFoundLegacy,
NumberFound,

@@ -36,7 +38,10 @@ NumberType,

export function findNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }): NumberFound[];
export function searchNumbers(text: string, options?: CountryCode | { defaultCountry?: CountryCode, v2?: boolean }): IterableIterator<NumberFound>;
export function findNumbers(text: string, options?: CountryCode): NumberFoundLegacy[];
export function searchNumbers(text: string, options?: CountryCode): IterableIterator<NumberFoundLegacy>;
export function findNumbers(text: string, { defaultCountry?: CountryCode, v2: true }): NumberFound[];
export function searchNumbers(text: string, { defaultCountry?: CountryCode, v2: true }): IterableIterator<NumberFound>;
export class PhoneNumberMatcher {
constructor(text: string, options?: { defaultCountry?: CountryCode, v2?: boolean });
constructor(text: string, options?: { defaultCountry?: CountryCode, v2: true });
hasNext(): boolean;

@@ -43,0 +48,0 @@ next(): NumberFound | undefined;

{
"name": "libphonenumber-js",
"version": "1.7.11",
"version": "1.7.12",
"description": "A simpler (and smaller) rewrite of Google Android's popular libphonenumber library",

@@ -5,0 +5,0 @@ "main": "index.common.js",

@@ -59,3 +59,3 @@ export type CountryCode = '001' | 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PR' | 'PS' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';

export interface NumberFoundV2 {
export interface NumberFound {
number: PhoneNumber,

@@ -74,6 +74,4 @@ startsAt: number,

export type NumberFound = NumberFoundV2 | NumberFoundLegacy
export class ParseError {
message: string;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc