Holds data for unicode property names and values. Many of the names, aliases, and valid set of values are extracted from the raw unicode source. The actual codepoint data comes from the node-unicode
library.
- Source
Members
(static, constant) names :PropertyIndex
Raw index of property names and values
- PropertyIndex
- Source
Methods
(async, static) get(name, valuenullable) → {Promise.<PropertyCharacters>}
Fetch character data given by the unicode property name-value pair. This will throw an error if the name-value pair is unknown.
Name | Type | Attributes | Description |
---|---|---|---|
name | string | property name, or if | |
value | string | <nullable> | property value; this can be blank, if |
- Source
- Type:
- Promise.<PropertyCharacters>
(async, static) load()
Lazily load the index of property names and values. The individual unicode codepoints for each are lazily loaded as they are needed
- Source
Type Definitions
PropertyCharacters
Unicode characters associated with a property name-value pair
- object
Name | Type | Description |
---|---|---|
group | Codepoints | container for characters |
invert | boolean | whether the group should be inverted (take the complement) to meet the property name-value criteria; this can be set for binary properties |
- Source
PropertyIndex
Property name/value index structure
- object
Name | Type | Description |
---|---|---|
shorthand | object.<string, string> | Map of property name to its shorthand alias |
values | object.<string, object.<string, string>> | For each shorthand property name, a map of property value its shorthand alias |
codepoints | object.<string, object.<string, Codepoints>> | For each property name a map of property value to Codepoints data |
- Source