Create a new unit
Optionalname: string
Unit name
Optionaloptions: UnitOptions
Unit options
Static ReadonlydStatic ReadonlyDECIBELProtected Static ReadonlyUNIT_Protected Static ReadonlyUNITSStatic ReadonlyUNKNOWNStatic ReadonlyWATTUnit aliases
Alias names as array
Unit name
Name
ProtectedprefixesGet or create a definition from this unit to the base
Definition to base
ProtectedfindFind unit specifier by name or alias
Unit name
Unit if found
Get the unit specifier
Unit prefix
Unit with specifier
StaticconvertStaticfindFind a unit by its name
Unit name
OptionalbaseName: string
Optional base name to specific result
Unit if found
StaticfromGet a unit from JSON
JSON object
Unit if found
StaticregisterRegister a new unit
Unit to register
Optionaloverride: boolean
Override an existing unit with the same name
Registered unit
Power unit (Watt).