getLongUnitString

common.getLongUnitString()
getLongUnitString(unit: UnitElement[]): string

Generates a human-readable unit string from an array of unit elements.

This function takes an array of unit elements and converts them into a standardized unit string representation. Units are sorted by exponent (highest first) and formatted with appropriate symbols and exponent notations.

Parameters

unit: UnitElement[]

An array of UnitElement objects containing basicUnit, exponent, and factor properties

Returns: string

A formatted string representing the combined units with proper symbols and exponents