Engine
Low-level functions exposed for advanced use cases or headless implementation.
applyMask
Applies a mask pattern to a raw value.
function applyMask(value: string, mask: string): stringcleanValue
Strips characters based on allowed/forbidden patterns.
function cleanValue(
value: string,
allowedChars?: RegExp,
forbiddenChars?: RegExp
): stringunmask
Removes mask characters from a value, returning the raw data.
function unmask(value: string, mask: string): stringstripMask
Similar to unmask but strictly removes characters that match the mask literals at their specific positions.
function stripMask(value: string, mask: string): string