Skip to Content

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): string

cleanValue

Strips characters based on allowed/forbidden patterns.

function cleanValue( value: string, allowedChars?: RegExp, forbiddenChars?: RegExp ): string

unmask

Removes mask characters from a value, returning the raw data.

function unmask(value: string, mask: string): string

stripMask

Similar to unmask but strictly removes characters that match the mask literals at their specific positions.

function stripMask(value: string, mask: string): string

© 2026 ViraStack. MIT License.