transformers/number library
Number type transformers.
This file contains transformers for converting values to various numeric types including integers, doubles, numbers, and BigInts.
Functions
-
toBigInt(
IValidator child, {String? message}) → IValidator - Coerces value to a BigInt.
-
toDouble(
IValidator child, {String? message}) → IValidator - Coerces a value to a double.
-
toInt(
IValidator child, {String? message}) → IValidator - Coerces a value to an integer.
-
toIntSafe(
IValidator child, {String? message}) → IValidator - Safe integer coercion (strict + 53-bit range guard).
-
toIntStrict(
IValidator child, {String? message}) → IValidator - Strict integer coercion.
-
toNum(
IValidator child, {String? message}) → IValidator -
Coerces a value to a number (
num).