@iabtcf/core
Version:
Ensures consistent encoding and decoding of TC Signals for the iab. Transparency and Consent Framework (TCF).
43 lines (42 loc) • 701 B
JavaScript
export class ConsentLanguages {
static langSet = new Set([
'BG',
'CA',
'CS',
'DA',
'DE',
'EL',
'EN',
'ES',
'ET',
'FI',
'FR',
'HR',
'HU',
'IT',
'JA',
'LT',
'LV',
'MT',
'NL',
'NO',
'PL',
'PT',
'RO',
'RU',
'SK',
'SL',
'SV',
'TR',
'ZH',
]);
has(key) {
return ConsentLanguages.langSet.has(key);
}
forEach(callback) {
ConsentLanguages.langSet.forEach(callback);
}
get size() {
return ConsentLanguages.langSet.size;
}
}