The map of defined classes by their name.
An array of the defined classes.
A list of dynamically created groups based on units specified by a user which are not defined by the developer.
Dynamic groups are mapped together (by default) by looking at the first few characters.
A map of the dynamically created groups by a key determined by Core.getDynamicMatch.
The global sort options used for ordering ranges in a Base instance.
The global transform options used for transforming a Base instance by specifying what sort of units/groups are visible to the user.
A map of groups by their acceptable units.
Adds the given class and all groups and units to the global state. If there are units mapped to other groups they are overwritten by the units in the given class.
The class to add to the global state.
Adds an array of classes to the global state.
The function which takes a unit and generates a string which should be used to mark similarly spelled units under the same dynamic group.
The unit to build a key from.
The key which identifies the dynamic group.
Returns a Group instance mapped by the given unit. If no unit is given
null
is returned. If the unit isn't mapped to a group a dynamic group
match is looked at and if none are found and createDynamic
is true a new
dynamic group is created.
The unit of the group to get.
If creating a dynamic group should be created if an existing group could not be found.
The group matched to the unit or null if none was found.
The function which takes to values and determines which one is more "normal" or "human friendly".
The most normal value found so far.
The value to compare to.
The transformation rules to guide the function to choose the more normal value.
The output options to guide the function to choose the more normal value.
True if toValue
appears more normal than fromValue
.
Creates a dynamic class & group based on the given unit and adds it to the global state. By default the group is marked with System.ANY, is common, and has the valid denominators 2, 3, 4, 5, 6, 8, 10.
The initial unit of the group to use as the name of the class and the base unit of the group.
An instance of a new Group with a new parent Class.
Sets whether the group associated with the given unit is common. A common group is one a user is familiar with and would be okay seeing values represented in. If a group is not found then this has no affect.
The unit of a group to set the common flag.
Whether the associated group should be common.
Sets the denominators for the group associated to the given unit. Denominators are useful for calculating a fraction from a value.
The unit of a group to set the denominators of.
The new denominators for the group.
Sets the given unit as the preferred unit for the group it belongs to. If a group is not found then this has no affect.
The unit to mark as the preferred unit.
Generated using TypeDoc
The global class which keeps track of all unit mappings and global options.
This class is also responsible for creating dynamic classes and groups based on approximation when a desired unit is not defined by the developer.