@parseapi/sdk 1.10.2 → 1.10.3
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/README.md +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +3 -3
- package/dist/offline.cjs +3 -3
- package/dist/offline.d.cts +1 -1
- package/dist/offline.d.ts +1 -1
- package/dist/offline.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -325,7 +325,7 @@ Invalid input returns `valid: false` with unknown provider fields. A checksum-va
|
|
|
325
325
|
|
|
326
326
|
The default pooled lookup includes provider identity, specialty and practice contact where held. Paid `deep` adds `deactivated_at`, `medicare`, `opt_out` and `enrollments` from stored source files, with no separate check meter or live verification. `enrollments: null` means unavailable; `[]` means no enrollment rows are returned. The API omits unrequested `deep` and returns `{}` when requested on Free.
|
|
327
327
|
|
|
328
|
-
Paid Deep also returns `taxonomies` in published order, with taxonomy code, specialty label, primary flag and provider-reported license number/state, plus `enumerated_at`, `updated_at` and `reactivated_at` record dates. Reported licenses are not verified licenses. Null lists mean unavailable; empty lists mean the edition contains no entries.
|
|
328
|
+
Paid Deep also returns `taxonomies` in published order, with taxonomy code, specialty label, primary flag and provider-reported license number/state, plus `enumerated_at`, `updated_at` and `reactivated_at` record dates. Reported licenses are not verified licenses. Null lists mean unavailable; empty lists mean the edition contains no entries. Provider record dates describe the provider record. Unknown dates stay null.
|
|
329
329
|
|
|
330
330
|
## Deep
|
|
331
331
|
|
package/dist/index.cjs
CHANGED
|
@@ -63,7 +63,7 @@ var EmojiCatalog = class {
|
|
|
63
63
|
compareNames;
|
|
64
64
|
segmenter;
|
|
65
65
|
constructor(data) {
|
|
66
|
-
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !data.metadata?.source_version) {
|
|
66
|
+
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !(data.metadata?.source_version || data.metadata?.edition)) {
|
|
67
67
|
throw new EmojiCatalogError("invalid_catalog", "Use the JSON response from GET /emoji/catalog.");
|
|
68
68
|
}
|
|
69
69
|
this.data = structuredClone(data);
|
|
@@ -252,7 +252,7 @@ var EmojiCatalog = class {
|
|
|
252
252
|
for (const [key, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
253
253
|
if (options[key] !== void 0 && (!options[key].trim() || !known.has(filterKey(options[key])))) invalid(`Unknown emoji ${key}. Use categories() to find supported values.`);
|
|
254
254
|
}
|
|
255
|
-
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version) > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
255
|
+
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
256
256
|
let rows = this.filtered(options);
|
|
257
257
|
if (query) {
|
|
258
258
|
this.ensureSearch();
|
|
@@ -272,7 +272,7 @@ var EmojiCatalog = class {
|
|
|
272
272
|
for (const [key2, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
273
273
|
if (options[key2] !== void 0 && (!options[key2].trim() || !known.has(filterKey(options[key2])))) invalid(`Unknown emoji ${key2}. Use categories() to find supported values.`);
|
|
274
274
|
}
|
|
275
|
-
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version) > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
275
|
+
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
276
276
|
if (options.includeSkinTones !== false && options.category === void 0 && options.subcategory === void 0 && options.version === void 0 && options.maxVersion === void 0) return this.data.emojis;
|
|
277
277
|
const key = JSON.stringify([options.includeSkinTones === false, options.category === void 0 ? null : filterKey(options.category), options.subcategory === void 0 ? null : filterKey(options.subcategory), options.version, options.maxVersion]);
|
|
278
278
|
const cached = this.filterCache.get(key);
|
package/dist/index.d.cts
CHANGED
|
@@ -501,8 +501,8 @@ interface Tariff {
|
|
|
501
501
|
lineage: string[];
|
|
502
502
|
/** Column 1 general rate, verbatim. */
|
|
503
503
|
general: string | null;
|
|
504
|
-
/**
|
|
505
|
-
revision
|
|
504
|
+
/** @deprecated Omitted from current API responses. */
|
|
505
|
+
revision?: string;
|
|
506
506
|
deep?: Deep<TariffDeep>;
|
|
507
507
|
}
|
|
508
508
|
interface TariffSearchHit {
|
|
@@ -518,7 +518,7 @@ interface TariffSearch {
|
|
|
518
518
|
/** Answering date, or null for an undated edition query. */
|
|
519
519
|
date?: string | null;
|
|
520
520
|
q: string;
|
|
521
|
-
revision
|
|
521
|
+
revision?: string;
|
|
522
522
|
/** Up to 20 tariff lines, best match first. */
|
|
523
523
|
lines: TariffSearchHit[];
|
|
524
524
|
}
|
|
@@ -813,9 +813,9 @@ interface Time extends Timezone {
|
|
|
813
813
|
/** With targets only. Order and duplicates are preserved. Null means the source timezone is unresolved. */
|
|
814
814
|
targets?: TimezoneConversionTarget[] | null;
|
|
815
815
|
}
|
|
816
|
-
/**
|
|
816
|
+
/** Available timezone identifiers. */
|
|
817
817
|
interface TimeZones {
|
|
818
|
-
timezone_database_version
|
|
818
|
+
timezone_database_version?: string;
|
|
819
819
|
timezones: string[];
|
|
820
820
|
/** Present with details=true. The one instant used for all rows. */
|
|
821
821
|
at?: string;
|
|
@@ -1115,7 +1115,7 @@ interface EmojiArtworkSource {
|
|
|
1115
1115
|
interface EmojiMetadata {
|
|
1116
1116
|
edition: string;
|
|
1117
1117
|
max_version: string | null;
|
|
1118
|
-
source_version
|
|
1118
|
+
source_version?: string;
|
|
1119
1119
|
total: number;
|
|
1120
1120
|
sources: EmojiSource[];
|
|
1121
1121
|
artwork_sources: EmojiArtworkSource[];
|
|
@@ -1301,7 +1301,7 @@ interface CompanyProfileEmployees {
|
|
|
1301
1301
|
/** Open string, currently legal_entity or consolidated_group. */
|
|
1302
1302
|
scope: string;
|
|
1303
1303
|
/** Open string, currently reported. */
|
|
1304
|
-
method
|
|
1304
|
+
method?: string;
|
|
1305
1305
|
approximate: boolean;
|
|
1306
1306
|
}
|
|
1307
1307
|
/** Legal form recorded by a register; codes remain open strings. */
|
|
@@ -1423,7 +1423,7 @@ interface CompanyCoverage {
|
|
|
1423
1423
|
scope: string;
|
|
1424
1424
|
label: string;
|
|
1425
1425
|
description: string;
|
|
1426
|
-
snapshot_at
|
|
1426
|
+
snapshot_at?: string;
|
|
1427
1427
|
companies: number;
|
|
1428
1428
|
countries: string[];
|
|
1429
1429
|
with_website: number;
|
|
@@ -1773,20 +1773,20 @@ interface TimeLocationInput {
|
|
|
1773
1773
|
value: string;
|
|
1774
1774
|
}
|
|
1775
1775
|
interface TimeLocationCandidate {
|
|
1776
|
-
id
|
|
1777
|
-
name
|
|
1778
|
-
country
|
|
1779
|
-
state
|
|
1780
|
-
timezone
|
|
1781
|
-
latitude
|
|
1782
|
-
longitude
|
|
1776
|
+
id?: string | null;
|
|
1777
|
+
name?: string | null;
|
|
1778
|
+
country?: string | null;
|
|
1779
|
+
state?: string | null;
|
|
1780
|
+
timezone?: string | null;
|
|
1781
|
+
latitude?: number | null;
|
|
1782
|
+
longitude?: number | null;
|
|
1783
1783
|
}
|
|
1784
1784
|
interface TimeLocation {
|
|
1785
1785
|
input: TimeLocationInput;
|
|
1786
1786
|
status: string;
|
|
1787
1787
|
candidates: TimeLocationCandidate[];
|
|
1788
1788
|
truncated: boolean;
|
|
1789
|
-
source
|
|
1789
|
+
source?: string;
|
|
1790
1790
|
}
|
|
1791
1791
|
type Industry = Naics;
|
|
1792
1792
|
type IndustryChild = NaicsChild;
|
package/dist/index.d.ts
CHANGED
|
@@ -501,8 +501,8 @@ interface Tariff {
|
|
|
501
501
|
lineage: string[];
|
|
502
502
|
/** Column 1 general rate, verbatim. */
|
|
503
503
|
general: string | null;
|
|
504
|
-
/**
|
|
505
|
-
revision
|
|
504
|
+
/** @deprecated Omitted from current API responses. */
|
|
505
|
+
revision?: string;
|
|
506
506
|
deep?: Deep<TariffDeep>;
|
|
507
507
|
}
|
|
508
508
|
interface TariffSearchHit {
|
|
@@ -518,7 +518,7 @@ interface TariffSearch {
|
|
|
518
518
|
/** Answering date, or null for an undated edition query. */
|
|
519
519
|
date?: string | null;
|
|
520
520
|
q: string;
|
|
521
|
-
revision
|
|
521
|
+
revision?: string;
|
|
522
522
|
/** Up to 20 tariff lines, best match first. */
|
|
523
523
|
lines: TariffSearchHit[];
|
|
524
524
|
}
|
|
@@ -813,9 +813,9 @@ interface Time extends Timezone {
|
|
|
813
813
|
/** With targets only. Order and duplicates are preserved. Null means the source timezone is unresolved. */
|
|
814
814
|
targets?: TimezoneConversionTarget[] | null;
|
|
815
815
|
}
|
|
816
|
-
/**
|
|
816
|
+
/** Available timezone identifiers. */
|
|
817
817
|
interface TimeZones {
|
|
818
|
-
timezone_database_version
|
|
818
|
+
timezone_database_version?: string;
|
|
819
819
|
timezones: string[];
|
|
820
820
|
/** Present with details=true. The one instant used for all rows. */
|
|
821
821
|
at?: string;
|
|
@@ -1115,7 +1115,7 @@ interface EmojiArtworkSource {
|
|
|
1115
1115
|
interface EmojiMetadata {
|
|
1116
1116
|
edition: string;
|
|
1117
1117
|
max_version: string | null;
|
|
1118
|
-
source_version
|
|
1118
|
+
source_version?: string;
|
|
1119
1119
|
total: number;
|
|
1120
1120
|
sources: EmojiSource[];
|
|
1121
1121
|
artwork_sources: EmojiArtworkSource[];
|
|
@@ -1301,7 +1301,7 @@ interface CompanyProfileEmployees {
|
|
|
1301
1301
|
/** Open string, currently legal_entity or consolidated_group. */
|
|
1302
1302
|
scope: string;
|
|
1303
1303
|
/** Open string, currently reported. */
|
|
1304
|
-
method
|
|
1304
|
+
method?: string;
|
|
1305
1305
|
approximate: boolean;
|
|
1306
1306
|
}
|
|
1307
1307
|
/** Legal form recorded by a register; codes remain open strings. */
|
|
@@ -1423,7 +1423,7 @@ interface CompanyCoverage {
|
|
|
1423
1423
|
scope: string;
|
|
1424
1424
|
label: string;
|
|
1425
1425
|
description: string;
|
|
1426
|
-
snapshot_at
|
|
1426
|
+
snapshot_at?: string;
|
|
1427
1427
|
companies: number;
|
|
1428
1428
|
countries: string[];
|
|
1429
1429
|
with_website: number;
|
|
@@ -1773,20 +1773,20 @@ interface TimeLocationInput {
|
|
|
1773
1773
|
value: string;
|
|
1774
1774
|
}
|
|
1775
1775
|
interface TimeLocationCandidate {
|
|
1776
|
-
id
|
|
1777
|
-
name
|
|
1778
|
-
country
|
|
1779
|
-
state
|
|
1780
|
-
timezone
|
|
1781
|
-
latitude
|
|
1782
|
-
longitude
|
|
1776
|
+
id?: string | null;
|
|
1777
|
+
name?: string | null;
|
|
1778
|
+
country?: string | null;
|
|
1779
|
+
state?: string | null;
|
|
1780
|
+
timezone?: string | null;
|
|
1781
|
+
latitude?: number | null;
|
|
1782
|
+
longitude?: number | null;
|
|
1783
1783
|
}
|
|
1784
1784
|
interface TimeLocation {
|
|
1785
1785
|
input: TimeLocationInput;
|
|
1786
1786
|
status: string;
|
|
1787
1787
|
candidates: TimeLocationCandidate[];
|
|
1788
1788
|
truncated: boolean;
|
|
1789
|
-
source
|
|
1789
|
+
source?: string;
|
|
1790
1790
|
}
|
|
1791
1791
|
type Industry = Naics;
|
|
1792
1792
|
type IndustryChild = NaicsChild;
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var EmojiCatalog = class {
|
|
|
34
34
|
compareNames;
|
|
35
35
|
segmenter;
|
|
36
36
|
constructor(data) {
|
|
37
|
-
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !data.metadata?.source_version) {
|
|
37
|
+
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !(data.metadata?.source_version || data.metadata?.edition)) {
|
|
38
38
|
throw new EmojiCatalogError("invalid_catalog", "Use the JSON response from GET /emoji/catalog.");
|
|
39
39
|
}
|
|
40
40
|
this.data = structuredClone(data);
|
|
@@ -223,7 +223,7 @@ var EmojiCatalog = class {
|
|
|
223
223
|
for (const [key, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
224
224
|
if (options[key] !== void 0 && (!options[key].trim() || !known.has(filterKey(options[key])))) invalid(`Unknown emoji ${key}. Use categories() to find supported values.`);
|
|
225
225
|
}
|
|
226
|
-
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version) > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
226
|
+
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
227
227
|
let rows = this.filtered(options);
|
|
228
228
|
if (query) {
|
|
229
229
|
this.ensureSearch();
|
|
@@ -243,7 +243,7 @@ var EmojiCatalog = class {
|
|
|
243
243
|
for (const [key2, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
244
244
|
if (options[key2] !== void 0 && (!options[key2].trim() || !known.has(filterKey(options[key2])))) invalid(`Unknown emoji ${key2}. Use categories() to find supported values.`);
|
|
245
245
|
}
|
|
246
|
-
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version) > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
246
|
+
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
247
247
|
if (options.includeSkinTones !== false && options.category === void 0 && options.subcategory === void 0 && options.version === void 0 && options.maxVersion === void 0) return this.data.emojis;
|
|
248
248
|
const key = JSON.stringify([options.includeSkinTones === false, options.category === void 0 ? null : filterKey(options.category), options.subcategory === void 0 ? null : filterKey(options.subcategory), options.version, options.maxVersion]);
|
|
249
249
|
const cached = this.filterCache.get(key);
|
package/dist/offline.cjs
CHANGED
|
@@ -61,7 +61,7 @@ var EmojiCatalog = class {
|
|
|
61
61
|
compareNames;
|
|
62
62
|
segmenter;
|
|
63
63
|
constructor(data) {
|
|
64
|
-
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !data.metadata?.source_version) {
|
|
64
|
+
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !(data.metadata?.source_version || data.metadata?.edition)) {
|
|
65
65
|
throw new EmojiCatalogError("invalid_catalog", "Use the JSON response from GET /emoji/catalog.");
|
|
66
66
|
}
|
|
67
67
|
this.data = structuredClone(data);
|
|
@@ -250,7 +250,7 @@ var EmojiCatalog = class {
|
|
|
250
250
|
for (const [key, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
251
251
|
if (options[key] !== void 0 && (!options[key].trim() || !known.has(filterKey(options[key])))) invalid(`Unknown emoji ${key}. Use categories() to find supported values.`);
|
|
252
252
|
}
|
|
253
|
-
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version) > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
253
|
+
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
254
254
|
let rows = this.filtered(options);
|
|
255
255
|
if (query) {
|
|
256
256
|
this.ensureSearch();
|
|
@@ -270,7 +270,7 @@ var EmojiCatalog = class {
|
|
|
270
270
|
for (const [key2, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
271
271
|
if (options[key2] !== void 0 && (!options[key2].trim() || !known.has(filterKey(options[key2])))) invalid(`Unknown emoji ${key2}. Use categories() to find supported values.`);
|
|
272
272
|
}
|
|
273
|
-
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version) > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
273
|
+
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
274
274
|
if (options.includeSkinTones !== false && options.category === void 0 && options.subcategory === void 0 && options.version === void 0 && options.maxVersion === void 0) return this.data.emojis;
|
|
275
275
|
const key = JSON.stringify([options.includeSkinTones === false, options.category === void 0 ? null : filterKey(options.category), options.subcategory === void 0 ? null : filterKey(options.subcategory), options.version, options.maxVersion]);
|
|
276
276
|
const cached = this.filterCache.get(key);
|
package/dist/offline.d.cts
CHANGED
package/dist/offline.d.ts
CHANGED
package/dist/offline.js
CHANGED
|
@@ -34,7 +34,7 @@ var EmojiCatalog = class {
|
|
|
34
34
|
compareNames;
|
|
35
35
|
segmenter;
|
|
36
36
|
constructor(data) {
|
|
37
|
-
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !data.metadata?.source_version) {
|
|
37
|
+
if (!data || !Array.isArray(data.emojis) || !data.forms || !data.shortcodes || !data.legacy || !(data.metadata?.source_version || data.metadata?.edition)) {
|
|
38
38
|
throw new EmojiCatalogError("invalid_catalog", "Use the JSON response from GET /emoji/catalog.");
|
|
39
39
|
}
|
|
40
40
|
this.data = structuredClone(data);
|
|
@@ -223,7 +223,7 @@ var EmojiCatalog = class {
|
|
|
223
223
|
for (const [key, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
224
224
|
if (options[key] !== void 0 && (!options[key].trim() || !known.has(filterKey(options[key])))) invalid(`Unknown emoji ${key}. Use categories() to find supported values.`);
|
|
225
225
|
}
|
|
226
|
-
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version) > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
226
|
+
for (const key of ["version", "maxVersion"]) if (options[key] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key]) || versionCompare(options[key], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
227
227
|
let rows = this.filtered(options);
|
|
228
228
|
if (query) {
|
|
229
229
|
this.ensureSearch();
|
|
@@ -243,7 +243,7 @@ var EmojiCatalog = class {
|
|
|
243
243
|
for (const [key2, known] of [["category", this.categoryKeys], ["subcategory", this.subcategoryKeys]]) {
|
|
244
244
|
if (options[key2] !== void 0 && (!options[key2].trim() || !known.has(filterKey(options[key2])))) invalid(`Unknown emoji ${key2}. Use categories() to find supported values.`);
|
|
245
245
|
}
|
|
246
|
-
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version) > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version}.`);
|
|
246
|
+
for (const key2 of ["version", "maxVersion"]) if (options[key2] !== void 0 && (!/^\d{1,2}\.\d{1,2}$/.test(options[key2]) || versionCompare(options[key2], this.data.metadata.source_version || this.data.metadata.max_version || "0.0") > 0)) invalid(`${key2} must be an Emoji version no newer than ${this.data.metadata.source_version || this.data.metadata.max_version || "0.0"}.`);
|
|
247
247
|
if (options.includeSkinTones !== false && options.category === void 0 && options.subcategory === void 0 && options.version === void 0 && options.maxVersion === void 0) return this.data.emojis;
|
|
248
248
|
const key = JSON.stringify([options.includeSkinTones === false, options.category === void 0 ? null : filterKey(options.category), options.subcategory === void 0 ? null : filterKey(options.subcategory), options.version, options.maxVersion]);
|
|
249
249
|
const cached = this.filterCache.get(key);
|