Skip to content

Function: digitsForMask()

ts
function digitsForMask(value, mask): string;

Prepares an agent-supplied value for a masked input: keeps slot characters and drops a repeated literal prefix (a phone typed with its leading 1 against a 1-000-000-0000 mask).

Parameters

ParameterType
valuestring
maskstring

Returns

string

Proprietary. All rights reserved.