@blotoutio/edgetag-sdk-js
Advanced tools
Comparing version 0.43.0 to 0.44.0
@@ -367,3 +367,3 @@ 'use strict'; | ||
locale: getLocale(), | ||
sdkVersion: "0.43.0" , | ||
sdkVersion: "0.44.0" , | ||
...(payload || {}), | ||
@@ -537,2 +537,36 @@ }; | ||
const expand = (str) => str.split(',').flatMap((entry) => { | ||
if (!entry.includes('-')) { | ||
return entry; | ||
} | ||
const result = []; | ||
const [start, end] = entry.split('-').map(Number); | ||
for (let i = start; i <= end; i++) { | ||
result.push(i.toString()); | ||
} | ||
return result; | ||
}); | ||
/** | ||
* Exported from https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes | ||
* | ||
* In Dev Tools, select the `tbody` element containing the area codes and run the following code, | ||
* replacing the emdash character with a simple endash: | ||
* | ||
* ```ts | ||
* [...$0.querySelectorAll('td:first-child')] | ||
* .filter(cell => cell.firstChild.nodeName != 'A') | ||
* .map(cell => cell.textContent.trim()).join(',') | ||
* ``` | ||
*/ | ||
new Set([ | ||
...expand('200,211,221,222,230,232,233,235,237-238,241,243,244,245,247,255,257,258-259,261,265,266,271,273,274,275,277,278,280,282,283,285-287,288,290-299'), | ||
...expand('300,311,322,324,327,328,333,335,338,342,344,348-349,353,355,356,357-359,362,366,369,370-379,381,382,383-384,387,388,389,390-399'), | ||
...expand('400,411,420,421-422,426-427,428,429,433,439,444,446,449,451-454,455,456,457,459,460,461-462,465,466,467,471,476,477,481-483,485-486,487,488,489,490-499'), | ||
...expand('511,532,535,536,537,538,542-543,545-547,549-550,552-554,555,556,558,560,565,568,569,576,578,583,589,590-599'), | ||
...expand('611,621,624,625,627,632,633,634-635,637-638,642-643,644,648,652-654,655,663,665,666,668,673-676,677,679,685,686,687,688,690-699'), | ||
...expand('711,722,723,729,733,735-736,739,741,744,745-746,748,749-751,752,755,756,759,761,764,766,768,776,777,783,788,789,790-799'), | ||
...expand('811,821,822,823-824,827,834,836,841-842,846,851,852-853,871,874-875,879,880-887,889,890-899'), | ||
...expand('911,921,922,923,924,926,927,932,933,935,942,944,946,950,953,955,957-958,960-969,974,975,976,977,981-982,987,988,990-999'), | ||
]); | ||
let initialized = false; | ||
@@ -539,0 +573,0 @@ const providersPackages = {}; |
{ | ||
"name": "@blotoutio/edgetag-sdk-js", | ||
"version": "0.43.0", | ||
"version": "0.44.0", | ||
"description": "JS SDK for EdgeTag", | ||
@@ -5,0 +5,0 @@ "author": "Blotout", |
Sorry, the diff of this file is not supported yet
72604
2384