Skip to main content
Version: v0.0.3

Interface: DecimalValue

A decimal value preserved exactly as it appeared on the wire.

NCPDP quantities, strengths, and days-supply are decimal quantities where binary floating point would silently corrupt the value (e.g. 0.1). We never parse them into a JS number; we keep the original source string and a validity flag, leaving any arithmetic to the consumer who can choose a decimal-safe representation.

Properties

isValid

readonly isValid: boolean

True when source matches a plain decimal numeric literal.


source

readonly source: string

The original textual value, verbatim.