io-ts-numbers
io-ts library for numbers
Install
npm install io-ts-numbers
Definitions
open circle = exclusive, closed circle = inclusive
This diagram denotes the sets of numbers included in some of the
codecs. Note that zero is neither positive nor negative.
Here we can see that the set of Positive numbers contains all reals
greater than zero. The set of NonPositive numbers contains the
remaining reals (including zero). The union of the set of Positive and
NonPositive numbers contains all real numbers.
This relationship is mirrored in the Negative and NonNegative sets,
and the Zero and NonZero sets.
The Natural numbers are defined by the Peano
axioms, so
the set of Natural numbers includes zero and every finite positive
integer.
Related
Acknowledgments