Skip to content

getMeasure

function getMeasure(unit): string | undefined;

Defined in: packages/engine/src/uom/UomConverter.ts:84

Get the measure/dimension kind for unit (e.g. "length", "mass", "temperature"), used to check whether two units are even in the same dimension before attempting a conversion.

ParameterType
unitstring

string | undefined

undefined if unit isn’t recognized, rather than throwing.