Commit 4b54e638 authored by Pithon Kabiro's avatar Pithon Kabiro
Browse files

Edit function: match measurement unit to symbol

Remove intermediate references
parent 1d5c8408
...@@ -8,16 +8,13 @@ ...@@ -8,16 +8,13 @@
const matchUnitOfMeasurementSymbolStringToSymbol = function ( const matchUnitOfMeasurementSymbolStringToSymbol = function (
unitOfMeasurementSymbolString unitOfMeasurementSymbolString
) { ) {
const unicodeCodePointDegreeSymbol = "\u00B0";
const unicodeCodePointSuperscriptThree = "\u00B3";
// Symbol - temperature // Symbol - temperature
if (unitOfMeasurementSymbolString === "degC") { if (unitOfMeasurementSymbolString === "degC") {
return `${unicodeCodePointDegreeSymbol}C`; return "\u00B0C";
} }
// Symbol - flow rate // Symbol - flow rate
else if (unitOfMeasurementSymbolString === "m3/h") { else if (unitOfMeasurementSymbolString === "m3/h") {
return `m${unicodeCodePointSuperscriptThree}/h`; return "m\u00B3/h";
} }
// If no symbol exists // If no symbol exists
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment