fn
maskNumberOptions
v0.0.14Mask options for a formatted number: optional thousands grouping, decimal precision, sign, prefix/postfix, and a live upper-bound clamp. The unmasked value is the canonical, separator-free number string.
Example
ts
maskNumberOptions({ thousandSeparator: ',', precision: 2, prefix: '$' });
// typing 1234.5 → '$1,234.5'Signature
ts
export function maskNumberOptions(params: MaskNumberParams ={ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
params? | MaskNumberParams | Formatting options |
Returns
MaskOptionsReady-to-use mask options| Property | Type | Description |
|---|---|---|
mask | Mask | The mask pattern (or a function of state). |
preprocessors? | readonly MaskPreprocessor[] | Normalizers run before conforming. |
postprocessors? | readonly MaskPostprocessor[] | Finishers run after conforming. |
overwriteMode? | OverwriteMode | Insert vs overwrite behavior. |