fn

calibrateValueByMask

tested

Entry point: conform state.value to mask. Fast-returns when the value is already a valid prefix, otherwise dispatches to the array or RegExp guesser.

Signature

ts
export function calibrateValueByMask(state: ElementState, mask: Mask): ElementState{ ... }

Parameters

ParameterTypeDescription
stateElementState
maskMask

Returns

ElementState
PropertyTypeDescription
valuestring
selectionSelectionRange