@valkyriestudios/utils 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic
6
6
  Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [7.4.0] - 2023-08-10
9
+ ### Added
10
+ - regexp/sanitize
11
+
12
+ ### Improved
13
+ - Dep: Upgrade @babel/cli to 7.22.10
14
+ - Dep: Upgrade @babel/core to 7.22.10
15
+ - Dep: Upgrade @babel/preset-env to 7.22.10
16
+ - Dep: Upgrade eslint to 8.46.0
17
+
18
+ ## [7.3.0] - 2023-06-25
19
+ ### Added
20
+ - data/continents.json
21
+ - data/countries.json
22
+
23
+ ### Improved
24
+ - Dep: Upgrade eslint to 8.43.0
25
+
8
26
  ## [7.2.0] - 2023-06-11
9
27
  ### Added
10
28
  - date/toUnix: Convert a date to its corresponding unix timestamp in seconds (1.000.000 ops in ~300ms)
package/README.md CHANGED
@@ -768,6 +768,12 @@ isRegExp(new RegExp(/ab+c/, 'i')); // TRUE
768
768
  isRegExp(/ab+c/i); // FALSE
769
769
  ```
770
770
 
771
+ - **sanitize(val:string)**
772
+ Escapes special characters in a string and returns a sanitized version safe for usage in RegExp instances
773
+ ```js
774
+ sanitizeRegExp('contact@valkyriestudios.be'); // contact@valkyriestudios\\.be
775
+ ```
776
+
771
777
  ### string
772
778
  - **isString(val:any)**
773
779
  Check if a variable is a string
@@ -0,0 +1,9 @@
1
+ [
2
+ {"name":"Africa", "code": "AF"},
3
+ {"name":"Antarctica", "code": "AN"},
4
+ {"name":"Asia", "code": "AS"},
5
+ {"name":"Europe", "code": "EU"},
6
+ {"name":"North America", "code": "NA"},
7
+ {"name":"Oceania", "code": "OC"},
8
+ {"name":"South America", "code": "SA"}
9
+ ]
@@ -0,0 +1,251 @@
1
+ [
2
+ {"name":"Afghanistan", "al2":"AF", "al3":"AFG", "num":"004"},
3
+ {"name":"Albania", "al2":"AL", "al3":"ALB", "num":"008"},
4
+ {"name":"Algeria", "al2":"DZ", "al3":"DZA", "num":"012"},
5
+ {"name":"American Samoa", "al2":"AS", "al3":"ASM", "num":"016"},
6
+ {"name":"Andorra", "al2":"AD", "al3":"AND", "num":"020"},
7
+ {"name":"Angola", "al2":"AO", "al3":"AGO", "num":"024"},
8
+ {"name":"Anguilla", "al2":"AI", "al3":"AIA", "num":"660"},
9
+ {"name":"Antarctica", "al2":"AQ", "al3":"ATA", "num":"010"},
10
+ {"name":"Antigua and Barbuda", "al2":"AG", "al3":"ATG", "num":"028"},
11
+ {"name":"Argentina", "al2":"AR", "al3":"ARG", "num":"032"},
12
+ {"name":"Armenia", "al2":"AM", "al3":"ARM", "num":"051"},
13
+ {"name":"Aruba", "al2":"AW", "al3":"ABW", "num":"533"},
14
+ {"name":"Australia", "al2":"AU", "al3":"AUS", "num":"036"},
15
+ {"name":"Austria", "al2":"AT", "al3":"AUT", "num":"040"},
16
+ {"name":"Azerbaijan", "al2":"AZ", "al3":"AZE", "num":"031"},
17
+ {"name":"Bahamas (the)", "al2":"BS", "al3":"BHS", "num":"044"},
18
+ {"name":"Bahrain", "al2":"BH", "al3":"BHR", "num":"048"},
19
+ {"name":"Bangladesh", "al2":"BD", "al3":"BGD", "num":"050"},
20
+ {"name":"Barbados", "al2":"BB", "al3":"BRB", "num":"052"},
21
+ {"name":"Belarus", "al2":"BY", "al3":"BLR", "num":"112"},
22
+ {"name":"Belgium", "al2":"BE", "al3":"BEL", "num":"056"},
23
+ {"name":"Belize", "al2":"BZ", "al3":"BLZ", "num":"084"},
24
+ {"name":"Benin", "al2":"BJ", "al3":"BEN", "num":"204"},
25
+ {"name":"Bermuda", "al2":"BM", "al3":"BMU", "num":"060"},
26
+ {"name":"Åland Islands", "al2":"AX", "al3":"ALA", "num":"248"},
27
+ {"name":"Bhutan", "al2":"BT", "al3":"BTN", "num":"064"},
28
+ {"name":"Bolivia (Plurinational State of)", "al2":"BO", "al3":"BOL", "num":"068"},
29
+ {"name":"Bonaire, Sint Eustatius and Saba", "al2":"BQ", "al3":"BES", "num":"535"},
30
+ {"name":"Bosnia and Herzegovina", "al2":"BA", "al3":"BIH", "num":"070"},
31
+ {"name":"Botswana", "al2":"BW", "al3":"BWA", "num":"072"},
32
+ {"name":"Bouvet Island", "al2":"BV", "al3":"BVT", "num":"074"},
33
+ {"name":"Brazil", "al2":"BR", "al3":"BRA", "num":"076"},
34
+ {"name":"British Indian Ocean Territory (the)", "al2":"IO", "al3":"IOT", "num":"086"},
35
+ {"name":"Brunei Darussalam", "al2":"BN", "al3":"BRN", "num":"096"},
36
+ {"name":"Bulgaria", "al2":"BG", "al3":"BGR", "num":"100"},
37
+ {"name":"Burkina Faso", "al2":"BF", "al3":"BFA", "num":"854"},
38
+ {"name":"Burundi", "al2":"BI", "al3":"BDI", "num":"108"},
39
+ {"name":"Cabo Verde", "al2":"CV", "al3":"CPV", "num":"132"},
40
+ {"name":"Cambodia", "al2":"KH", "al3":"KHM", "num":"116"},
41
+ {"name":"Cameroon", "al2":"CM", "al3":"CMR", "num":"120"},
42
+ {"name":"Canada", "al2":"CA", "al3":"CAN", "num":"124"},
43
+ {"name":"Cayman Islands (the)", "al2":"KY", "al3":"CYM", "num":"136"},
44
+ {"name":"Central African Republic (the)", "al2":"CF", "al3":"CAF", "num":"140"},
45
+ {"name":"Chad", "al2":"TD", "al3":"TCD", "num":"148"},
46
+ {"name":"Chile", "al2":"CL", "al3":"CHL", "num":"152"},
47
+ {"name":"China", "al2":"CN", "al3":"CHN", "num":"156"},
48
+ {"name":"Christmas Island", "al2":"CX", "al3":"CXR", "num":"162"},
49
+ {"name":"Cocos (Keeling) Islands (the)", "al2":"CC", "al3":"CCK", "num":"166"},
50
+ {"name":"Colombia", "al2":"CO", "al3":"COL", "num":"170"},
51
+ {"name":"Comoros (the)", "al2":"KM", "al3":"COM", "num":"174"},
52
+ {"name":"Congo (the Democratic Republic of the)", "al2":"CD", "al3":"COD", "num":"180"},
53
+ {"name":"Congo (the)", "al2":"CG", "al3":"COG", "num":"178"},
54
+ {"name":"Cook Islands (the)", "al2":"CK", "al3":"COK", "num":"184"},
55
+ {"name":"Costa Rica", "al2":"CR", "al3":"CRI", "num":"188"},
56
+ {"name":"Croatia", "al2":"HR", "al3":"HRV", "num":"191"},
57
+ {"name":"Cuba", "al2":"CU", "al3":"CUB", "num":"192"},
58
+ {"name":"Curaçao", "al2":"CW", "al3":"CUW", "num":"531"},
59
+ {"name":"Cyprus", "al2":"CY", "al3":"CYP", "num":"196"},
60
+ {"name":"Czechia", "al2":"CZ", "al3":"CZE", "num":"203"},
61
+ {"name":"Côte d'Ivoire", "al2":"CI", "al3":"CIV", "num":"384"},
62
+ {"name":"Denmark", "al2":"DK", "al3":"DNK", "num":"208"},
63
+ {"name":"Djibouti", "al2":"DJ", "al3":"DJI", "num":"262"},
64
+ {"name":"Dominica", "al2":"DM", "al3":"DMA", "num":"212"},
65
+ {"name":"Dominican Republic (the)", "al2":"DO", "al3":"DOM", "num":"214"},
66
+ {"name":"Ecuador", "al2":"EC", "al3":"ECU", "num":"218"},
67
+ {"name":"Egypt", "al2":"EG", "al3":"EGY", "num":"818"},
68
+ {"name":"El Salvador", "al2":"SV", "al3":"SLV", "num":"222"},
69
+ {"name":"Equatorial Guinea", "al2":"GQ", "al3":"GNQ", "num":"226"},
70
+ {"name":"Eritrea", "al2":"ER", "al3":"ERI", "num":"232"},
71
+ {"name":"Estonia", "al2":"EE", "al3":"EST", "num":"233"},
72
+ {"name":"Eswatini", "al2":"SZ", "al3":"SWZ", "num":"748"},
73
+ {"name":"Ethiopia", "al2":"ET", "al3":"ETH", "num":"231"},
74
+ {"name":"Falkland Islands (the) [Malvinas]", "al2":"FK", "al3":"FLK", "num":"238"},
75
+ {"name":"Faroe Islands (the)", "al2":"FO", "al3":"FRO", "num":"234"},
76
+ {"name":"Fiji", "al2":"FJ", "al3":"FJI", "num":"242"},
77
+ {"name":"Finland", "al2":"FI", "al3":"FIN", "num":"246"},
78
+ {"name":"France", "al2":"FR", "al3":"FRA", "num":"250"},
79
+ {"name":"French Guiana", "al2":"GF", "al3":"GUF", "num":"254"},
80
+ {"name":"French Polynesia", "al2":"PF", "al3":"PYF", "num":"258"},
81
+ {"name":"French Southern Territories (the)", "al2":"TF", "al3":"ATF", "num":"260"},
82
+ {"name":"Gabon", "al2":"GA", "al3":"GAB", "num":"266"},
83
+ {"name":"Gambia (the)", "al2":"GM", "al3":"GMB", "num":"270"},
84
+ {"name":"Georgia", "al2":"GE", "al3":"GEO", "num":"268"},
85
+ {"name":"Germany", "al2":"DE", "al3":"DEU", "num":"276"},
86
+ {"name":"Ghana", "al2":"GH", "al3":"GHA", "num":"288"},
87
+ {"name":"Gibraltar", "al2":"GI", "al3":"GIB", "num":"292"},
88
+ {"name":"Greece", "al2":"GR", "al3":"GRC", "num":"300"},
89
+ {"name":"Greenland", "al2":"GL", "al3":"GRL", "num":"304"},
90
+ {"name":"Grenada", "al2":"GD", "al3":"GRD", "num":"308"},
91
+ {"name":"Guadeloupe", "al2":"GP", "al3":"GLP", "num":"312"},
92
+ {"name":"Guam", "al2":"GU", "al3":"GUM", "num":"316"},
93
+ {"name":"Guatemala", "al2":"GT", "al3":"GTM", "num":"320"},
94
+ {"name":"Guernsey", "al2":"GG", "al3":"GGY", "num":"831"},
95
+ {"name":"Guinea", "al2":"GN", "al3":"GIN", "num":"324"},
96
+ {"name":"Guinea-Bissau", "al2":"GW", "al3":"GNB", "num":"624"},
97
+ {"name":"Guyana", "al2":"GY", "al3":"GUY", "num":"328"},
98
+ {"name":"Haiti", "al2":"HT", "al3":"HTI", "num":"332"},
99
+ {"name":"Heard Island and McDonald Islands", "al2":"HM", "al3":"HMD", "num":"334"},
100
+ {"name":"Holy See (the)", "al2":"VA", "al3":"VAT", "num":"336"},
101
+ {"name":"Honduras", "al2":"HN", "al3":"HND", "num":"340"},
102
+ {"name":"Hong Kong", "al2":"HK", "al3":"HKG", "num":"344"},
103
+ {"name":"Hungary", "al2":"HU", "al3":"HUN", "num":"348"},
104
+ {"name":"Iceland", "al2":"IS", "al3":"ISL", "num":"352"},
105
+ {"name":"India", "al2":"IN", "al3":"IND", "num":"356"},
106
+ {"name":"Indonesia", "al2":"ID", "al3":"IDN", "num":"360"},
107
+ {"name":"Iran (Islamic Republic of)", "al2":"IR", "al3":"IRN", "num":"364"},
108
+ {"name":"Iraq", "al2":"IQ", "al3":"IRQ", "num":"368"},
109
+ {"name":"Ireland", "al2":"IE", "al3":"IRL", "num":"372"},
110
+ {"name":"Isle of Man", "al2":"IM", "al3":"IMN", "num":"833"},
111
+ {"name":"Israel", "al2":"IL", "al3":"ISR", "num":"376"},
112
+ {"name":"Italy", "al2":"IT", "al3":"ITA", "num":"380"},
113
+ {"name":"Jamaica", "al2":"JM", "al3":"JAM", "num":"388"},
114
+ {"name":"Japan", "al2":"JP", "al3":"JPN", "num":"392"},
115
+ {"name":"Jersey", "al2":"JE", "al3":"JEY", "num":"832"},
116
+ {"name":"Jordan", "al2":"JO", "al3":"JOR", "num":"400"},
117
+ {"name":"Kazakhstan", "al2":"KZ", "al3":"KAZ", "num":"398"},
118
+ {"name":"Kenya", "al2":"KE", "al3":"KEN", "num":"404"},
119
+ {"name":"Kiribati", "al2":"KI", "al3":"KIR", "num":"296"},
120
+ {"name":"Korea (the Democratic People's Republic of)", "al2":"KP", "al3":"PRK", "num":"408"},
121
+ {"name":"Korea (the Republic of)", "al2":"KR", "al3":"KOR", "num":"410"},
122
+ {"name":"Kuwait", "al2":"KW", "al3":"KWT", "num":"414"},
123
+ {"name":"Kyrgyzstan", "al2":"KG", "al3":"KGZ", "num":"417"},
124
+ {"name":"Lao People's Democratic Republic (the)", "al2":"LA", "al3":"LAO", "num":"418"},
125
+ {"name":"Latvia", "al2":"LV", "al3":"LVA", "num":"428"},
126
+ {"name":"Lebanon", "al2":"LB", "al3":"LBN", "num":"422"},
127
+ {"name":"Lesotho", "al2":"LS", "al3":"LSO", "num":"426"},
128
+ {"name":"Liberia", "al2":"LR", "al3":"LBR", "num":"430"},
129
+ {"name":"Libya", "al2":"LY", "al3":"LBY", "num":"434"},
130
+ {"name":"Liechtenstein", "al2":"LI", "al3":"LIE", "num":"438"},
131
+ {"name":"Lithuania", "al2":"LT", "al3":"LTU", "num":"440"},
132
+ {"name":"Luxembourg", "al2":"LU", "al3":"LUX", "num":"442"},
133
+ {"name":"Macao", "al2":"MO", "al3":"MAC", "num":"446"},
134
+ {"name":"Madagascar", "al2":"MG", "al3":"MDG", "num":"450"},
135
+ {"name":"Malawi", "al2":"MW", "al3":"MWI", "num":"454"},
136
+ {"name":"Malaysia", "al2":"MY", "al3":"MYS", "num":"458"},
137
+ {"name":"Maldives", "al2":"MV", "al3":"MDV", "num":"462"},
138
+ {"name":"Mali", "al2":"ML", "al3":"MLI", "num":"466"},
139
+ {"name":"Malta", "al2":"MT", "al3":"MLT", "num":"470"},
140
+ {"name":"Marshall Islands (the)", "al2":"MH", "al3":"MHL", "num":"584"},
141
+ {"name":"Martinique", "al2":"MQ", "al3":"MTQ", "num":"474"},
142
+ {"name":"Mauritania", "al2":"MR", "al3":"MRT", "num":"478"},
143
+ {"name":"Mauritius", "al2":"MU", "al3":"MUS", "num":"480"},
144
+ {"name":"Mayotte", "al2":"YT", "al3":"MYT", "num":"175"},
145
+ {"name":"Mexico", "al2":"MX", "al3":"MEX", "num":"484"},
146
+ {"name":"Micronesia (Federated States of)", "al2":"FM", "al3":"FSM", "num":"583"},
147
+ {"name":"Moldova (the Republic of)", "al2":"MD", "al3":"MDA", "num":"498"},
148
+ {"name":"Monaco", "al2":"MC", "al3":"MCO", "num":"492"},
149
+ {"name":"Mongolia", "al2":"MN", "al3":"MNG", "num":"496"},
150
+ {"name":"Montenegro", "al2":"ME", "al3":"MNE", "num":"499"},
151
+ {"name":"Montserrat", "al2":"MS", "al3":"MSR", "num":"500"},
152
+ {"name":"Morocco", "al2":"MA", "al3":"MAR", "num":"504"},
153
+ {"name":"Mozambique", "al2":"MZ", "al3":"MOZ", "num":"508"},
154
+ {"name":"Myanmar", "al2":"MM", "al3":"MMR", "num":"104"},
155
+ {"name":"Namibia", "al2":"NA", "al3":"NAM", "num":"516"},
156
+ {"name":"Nauru", "al2":"NR", "al3":"NRU", "num":"520"},
157
+ {"name":"Nepal", "al2":"NP", "al3":"NPL", "num":"524"},
158
+ {"name":"Netherlands (Kingdom of the)", "al2":"NL", "al3":"NLD", "num":"528"},
159
+ {"name":"New Caledonia", "al2":"NC", "al3":"NCL", "num":"540"},
160
+ {"name":"New Zealand", "al2":"NZ", "al3":"NZL", "num":"554"},
161
+ {"name":"Nicaragua", "al2":"NI", "al3":"NIC", "num":"558"},
162
+ {"name":"Niger (the)", "al2":"NE", "al3":"NER", "num":"562"},
163
+ {"name":"Nigeria", "al2":"NG", "al3":"NGA", "num":"566"},
164
+ {"name":"Niue", "al2":"NU", "al3":"NIU", "num":"570"},
165
+ {"name":"Norfolk Island", "al2":"NF", "al3":"NFK", "num":"574"},
166
+ {"name":"North Macedonia", "al2":"MK", "al3":"MKD", "num":"807"},
167
+ {"name":"Northern Mariana Islands (the)", "al2":"MP", "al3":"MNP", "num":"580"},
168
+ {"name":"Norway", "al2":"NO", "al3":"NOR", "num":"578"},
169
+ {"name":"Oman", "al2":"OM", "al3":"OMN", "num":"512"},
170
+ {"name":"Pakistan", "al2":"PK", "al3":"PAK", "num":"586"},
171
+ {"name":"Palau", "al2":"PW", "al3":"PLW", "num":"585"},
172
+ {"name":"Palestine, State of", "al2":"PS", "al3":"PSE", "num":"275"},
173
+ {"name":"Panama", "al2":"PA", "al3":"PAN", "num":"591"},
174
+ {"name":"Papua New Guinea", "al2":"PG", "al3":"PNG", "num":"598"},
175
+ {"name":"Paraguay", "al2":"PY", "al3":"PRY", "num":"600"},
176
+ {"name":"Peru", "al2":"PE", "al3":"PER", "num":"604"},
177
+ {"name":"Philippines (the)", "al2":"PH", "al3":"PHL", "num":"608"},
178
+ {"name":"Pitcairn", "al2":"PN", "al3":"PCN", "num":"612"},
179
+ {"name":"Poland", "al2":"PL", "al3":"POL", "num":"616"},
180
+ {"name":"Portugal", "al2":"PT", "al3":"PRT", "num":"620"},
181
+ {"name":"Puerto Rico", "al2":"PR", "al3":"PRI", "num":"630"},
182
+ {"name":"Qatar", "al2":"QA", "al3":"QAT", "num":"634"},
183
+ {"name":"Romania", "al2":"RO", "al3":"ROU", "num":"642"},
184
+ {"name":"Russian Federation (the)", "al2":"RU", "al3":"RUS", "num":"643"},
185
+ {"name":"Rwanda", "al2":"RW", "al3":"RWA", "num":"646"},
186
+ {"name":"Réunion", "al2":"RE", "al3":"REU", "num":"638"},
187
+ {"name":"Saint Barthélemy", "al2":"BL", "al3":"BLM", "num":"652"},
188
+ {"name":"Saint Helena, Ascension and Tristan da Cunha", "al2":"SH", "al3":"SHN", "num":"654"},
189
+ {"name":"Saint Kitts and Nevis", "al2":"KN", "al3":"KNA", "num":"659"},
190
+ {"name":"Saint Lucia", "al2":"LC", "al3":"LCA", "num":"662"},
191
+ {"name":"Saint Martin (French part)", "al2":"MF", "al3":"MAF", "num":"663"},
192
+ {"name":"Saint Pierre and Miquelon", "al2":"PM", "al3":"SPM", "num":"666"},
193
+ {"name":"Saint Vincent and the Grenadines", "al2":"VC", "al3":"VCT", "num":"670"},
194
+ {"name":"Samoa", "al2":"WS", "al3":"WSM", "num":"882"},
195
+ {"name":"San Marino", "al2":"SM", "al3":"SMR", "num":"674"},
196
+ {"name":"Sao Tome and Principe", "al2":"ST", "al3":"STP", "num":"678"},
197
+ {"name":"Saudi Arabia", "al2":"SA", "al3":"SAU", "num":"682"},
198
+ {"name":"Senegal", "al2":"SN", "al3":"SEN", "num":"686"},
199
+ {"name":"Serbia", "al2":"RS", "al3":"SRB", "num":"688"},
200
+ {"name":"Seychelles", "al2":"SC", "al3":"SYC", "num":"690"},
201
+ {"name":"Sierra Leone", "al2":"SL", "al3":"SLE", "num":"694"},
202
+ {"name":"Singapore", "al2":"SG", "al3":"SGP", "num":"702"},
203
+ {"name":"Sint Maarten (Dutch part)", "al2":"SX", "al3":"SXM", "num":"534"},
204
+ {"name":"Slovakia", "al2":"SK", "al3":"SVK", "num":"703"},
205
+ {"name":"Slovenia", "al2":"SI", "al3":"SVN", "num":"705"},
206
+ {"name":"Solomon Islands", "al2":"SB", "al3":"SLB", "num":"090"},
207
+ {"name":"Somalia", "al2":"SO", "al3":"SOM", "num":"706"},
208
+ {"name":"South Africa", "al2":"ZA", "al3":"ZAF", "num":"710"},
209
+ {"name":"South Georgia and the South Sandwich Islands", "al2":"GS", "al3":"SGS", "num":"239"},
210
+ {"name":"South Sudan", "al2":"SS", "al3":"SSD", "num":"728"},
211
+ {"name":"Spain", "al2":"ES", "al3":"ESP", "num":"724"},
212
+ {"name":"Sri Lanka", "al2":"LK", "al3":"LKA", "num":"144"},
213
+ {"name":"Sudan (the)", "al2":"SD", "al3":"SDN", "num":"729"},
214
+ {"name":"Suriname", "al2":"SR", "al3":"SUR", "num":"740"},
215
+ {"name":"Svalbard and Jan Mayen", "al2":"SJ", "al3":"SJM", "num":"744"},
216
+ {"name":"Sweden", "al2":"SE", "al3":"SWE", "num":"752"},
217
+ {"name":"Switzerland", "al2":"CH", "al3":"CHE", "num":"756"},
218
+ {"name":"Syrian Arab Republic (the)", "al2":"SY", "al3":"SYR", "num":"760"},
219
+ {"name":"Taiwan (Province of China)", "al2":"TW", "al3":"TWN", "num":"158"},
220
+ {"name":"Tajikistan", "al2":"TJ", "al3":"TJK", "num":"762"},
221
+ {"name":"Tanzania, the United Republic of", "al2":"TZ", "al3":"TZA", "num":"834"},
222
+ {"name":"Thailand", "al2":"TH", "al3":"THA", "num":"764"},
223
+ {"name":"Timor-Leste", "al2":"TL", "al3":"TLS", "num":"626"},
224
+ {"name":"Togo", "al2":"TG", "al3":"TGO", "num":"768"},
225
+ {"name":"Tokelau", "al2":"TK", "al3":"TKL", "num":"772"},
226
+ {"name":"Tonga", "al2":"TO", "al3":"TON", "num":"776"},
227
+ {"name":"Trinidad and Tobago", "al2":"TT", "al3":"TTO", "num":"780"},
228
+ {"name":"Tunisia", "al2":"TN", "al3":"TUN", "num":"788"},
229
+ {"name":"Turkmenistan", "al2":"TM", "al3":"TKM", "num":"795"},
230
+ {"name":"Turks and Caicos Islands (the)", "al2":"TC", "al3":"TCA", "num":"796"},
231
+ {"name":"Tuvalu", "al2":"TV", "al3":"TUV", "num":"798"},
232
+ {"name":"Türkiye", "al2":"TR", "al3":"TUR", "num":"792"},
233
+ {"name":"Uganda", "al2":"UG", "al3":"UGA", "num":"800"},
234
+ {"name":"Ukraine", "al2":"UA", "al3":"UKR", "num":"804"},
235
+ {"name":"United Arab Emirates (the)", "al2":"AE", "al3":"ARE", "num":"784"},
236
+ {"name":"United Kingdom of Great Britain and Northern Ireland (the)", "al2":"GB", "al3":"GBR", "num":"826"},
237
+ {"name":"United States Minor Outlying Islands (the)", "al2":"UM", "al3":"UMI", "num":"581"},
238
+ {"name":"United States of America (the)", "al2":"US", "al3":"USA", "num":"840"},
239
+ {"name":"Uruguay", "al2":"UY", "al3":"URY", "num":"858"},
240
+ {"name":"Uzbekistan", "al2":"UZ", "al3":"UZB", "num":"860"},
241
+ {"name":"Vanuatu", "al2":"VU", "al3":"VUT", "num":"548"},
242
+ {"name":"Venezuela (Bolivarian Republic of)", "al2":"VE", "al3":"VEN", "num":"862"},
243
+ {"name":"Viet Nam", "al2":"VN", "al3":"VNM", "num":"704"},
244
+ {"name":"Virgin Islands (British)", "al2":"VG", "al3":"VGB", "num":"092"},
245
+ {"name":"Virgin Islands (U.S.)", "al2":"VI", "al3":"VIR", "num":"850"},
246
+ {"name":"Wallis and Futuna", "al2":"WF", "al3":"WLF", "num":"876"},
247
+ {"name":"Western Sahara*", "al2":"EH", "al3":"ESH", "num":"732"},
248
+ {"name":"Yemen", "al2":"YE", "al3":"YEM", "num":"887"},
249
+ {"name":"Zambia", "al2":"ZM", "al3":"ZMB", "num":"894"},
250
+ {"name":"Zimbabwe", "al2":"ZW", "al3":"ZWE", "num":"716"}
251
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valkyriestudios/utils",
3
- "version": "7.2.0",
3
+ "version": "7.4.0",
4
4
  "description": "A collection of single-function utilities for common tasks",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "homepage": "https://github.com/ValkyrieStudios/utils#readme",
34
34
  "devDependencies": {
35
- "@babel/cli": "^7.22.5",
36
- "@babel/core": "^7.22.5",
37
- "@babel/preset-env": "^7.22.5",
35
+ "@babel/cli": "^7.22.10",
36
+ "@babel/core": "^7.22.10",
37
+ "@babel/preset-env": "^7.22.10",
38
38
  "@babel/register": "^7.22.5",
39
39
  "babel-plugin-check-es2015-constants": "^6.22.0",
40
40
  "babel-plugin-transform-member-expression-literals": "^6.9.4",
@@ -44,7 +44,7 @@
44
44
  "chai": "^4.3.7",
45
45
  "chai-as-promised": "^7.1.1",
46
46
  "chai-spies": "^1.0.0",
47
- "eslint": "^8.42.0",
47
+ "eslint": "^8.46.0",
48
48
  "mocha": "^10.2.0",
49
49
  "nyc": "^15.1.0"
50
50
  }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ exports["default"] = sanitizeRegExp;
7
+ var _isNotEmpty = _interopRequireDefault(require("../string/isNotEmpty"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function sanitizeRegExp(val) {
10
+ if (!(0, _isNotEmpty["default"])(val)) return !1;
11
+ return val.trim().replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&');
12
+ }