src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js
function parseValue(vValue, sSourceType, aCurrentValues) {
			var iDecimals, iFractionDigits, aMatches, sUnit, aValues;

			if (this.mCustomUnits === undefined) {
				throw new ParseException("Cannot parse value without customizing");
			}

			aValues = fnBaseType.prototype.parseValue.apply(this, arguments);
			sUnit = aValues[1] || aCurrentValues[1];
			// remove trailing decimal zeroes and separator
			if (aValues[0].includes(".")) {
				aValues[0] = aValues[0].replace(rTrailingZeros, "").replace(rSeparator, "");
			}
			if (sUnit && this.mCustomUnits) {
				aMatches = rDecimals.exec(aValues[0]);
				iFractionDigits = aMatches ? aMatches[1].length : 0;
				// If the unit is not in mCustomUnits, the base class throws a ParseException.
				iDecimals = this.mCustomUnits[sUnit].decimals;
				if (iFractionDigits > iDecimals) {
					throw new ParseException(iDecimals
						? getText("EnterNumberFraction", [iDecimals])
						: getText("EnterInt"));
				}
			}
			if (!this.bParseAsString) {
				aValues[0] = Number(aValues[0]);
			}

			return aValues;
		}
function parseValue(vValue, sSourceType, aCurrentValues) {
			var iDecimals, iFractionDigits, aMatches, sUnit, aValues;

			if (this.mCustomUnits === undefined) {
				throw new ParseException("Cannot parse value without customizing");
			}

			aValues = fnBaseType.prototype.parseValue.apply(this, arguments);
			sUnit = aValues[1] || aCurrentValues[1];
			// remove trailing decimal zeroes and separator
			if (aValues[0].includes(".")) {
				aValues[0] = aValues[0].replace(rTrailingZeros, "").replace(rSeparator, "");
			}
			if (sUnit && this.mCustomUnits) {
				aMatches = rDecimals.exec(aValues[0]);
				iFractionDigits = aMatches ? aMatches[1].length : 0;
				// If the unit is not in mCustomUnits, the base class throws a ParseException.
				iDecimals = this.mCustomUnits[sUnit].decimals;
				if (iFractionDigits > iDecimals) {
					throw new ParseException(iDecimals
						? getText("EnterNumberFraction", [iDecimals])
						: getText("EnterInt"));
				}
			}
			if (!this.bParseAsString) {
				aValues[0] = Number(aValues[0]);
			}

			return aValues;
		}
function parseValue ( vValue , sSourceType , aCurrentValues ) { var iDecimals , iFractionDigits , aMatches , sUnit , aValues ; if ( this . mCustomUnits === undefined ) { throw new ParseException ( "Cannot parse value without customizing" ) ; } aValues = fnBaseType . prototype . parseValue . apply ( this , arguments ) ; sUnit = aValues [ 1 ] || aCurrentValues [ 1 ] ; // remove trailing decimal zeroes and separator if ( aValues [ 0 ] . includes ( "." ) ) { aValues [ 0 ] = aValues [ 0 ] . replace ( rTrailingZeros , "" ) . replace ( rSeparator , "" ) ; } if ( sUnit && this . mCustomUnits ) { aMatches = rDecimals . exec ( aValues [ 0 ] ) ; iFractionDigits = aMatches ? aMatches [ 1 ] . length : 0 ; // If the unit is not in mCustomUnits, the base class throws a ParseException. iDecimals = this . mCustomUnits [ sUnit ] . decimals ; if ( iFractionDigits > iDecimals ) { throw new ParseException ( iDecimals ? getText ( "EnterNumberFraction" , [ iDecimals ] ) : getText ( "EnterInt" ) ) ; } } if ( ! this . bParseAsString ) { aValues [ 0 ] = Number ( aValues [ 0 ] ) ; } return aValues ; }
Parses the given string value to an array containing measure or amount, and unit or
currency.

@param {string} vValue
The value to be parsed
@param {string} sSourceType
The source type (the expected type of <code>vValue</code>); must be "string", or a type
with "string" as its
{@link sap.ui.base.DataType#getPrimitiveType primitive type}.
See {@link sap.ui.model.odata.type} for more information.
@param {any[]} aCurrentValues
The current values of all binding parts
@returns {any[]}
An array containing measure or amount, and unit or currency in this order. Measure or
amount, and unit or currency, are string values unless the format option
<code>parseAsString</code> is <code>false</code>; in this case, the measure or amount
is a number.
@throws {sap.ui.model.ParseException}
If {@link #formatValue} has not yet been called with a customizing part or
if <code>sSourceType</code> is unsupported or if the given string cannot be parsed

@function
@name sap.ui.model.odata.type.UnitMixin#parseValue
@public
@see sap.ui.model.type.Unit#parseValue
@since 1.63.0
Parses the given string value to an array containing measure or amount and unit or currency .