How to use unicode-property-aliases - 1 common examples

To help you get started, we’ve selected a few unicode-property-aliases examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathiasbynens / node-unicode-data / scripts / parse-blocks-scripts-properties.js View on Github external
)
		) {
			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') {

unicode-property-aliases

Unicode property alias mappings in JavaScript format.

MIT
Latest version published 10 months ago

Package Health Score

56 / 100
Full package analysis

Popular unicode-property-aliases functions