API Reference > imodeljs-Quantity > Quantity > Format > parseFormatTrait parseFormatTrait MethodStatic This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid FormatTrait. Throws exception if not valid. parseFormatTrait(stringToCheck: string, currentFormatTrait: number): FormatTraits Parameter Type Description stringToCheck string currentFormatTrait number Returns - FormatTraits Defined in quantity/src/Formatter/Format.ts Line 170 Last Updated: 11 June, 2024