Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
) {
continue;
}
const data = line.trim().split(';');
const charRange = data[0].replace('..', '-').trim();
let item = data[1].split(
type == 'blocks' ? ';' : '#'
)[0].trim().replace(/\x20/g, '_');
if (type == 'derived-normalization-properties') {
if (item == 'FNC') {
// Old Unicode versions up to v4.0.0 use the `FNC` alias instead of
// `FC_NFKC` (for `FC_NFKC_Closure`). This is not a binary property.
continue;
} else {
const canonical = propertyAliases.get(item);
if (canonical) {
if (/FC_NFKC_Closure|NFKC_Casefold|(?:NFC|NFD|NFKC|NFKD)_Quick_Check/.test(canonical)) {
// These are not binary properties, or their default value (in the
// file) is not `True`.
continue;
}
item = canonical;
}
}
}
if (type == 'blocks') {
// Use canonical block names. See #34
const tmp = looseMatch('Block', item).value;
console.assert(item, `Canonical block name not found for ${item}`);
item = tmp;
} else if (type == 'bidi-mirroring') {