• Replaces all but the last num of characters with the specified mask character

    Example

    mask('1234567890'); // '******7890'
    

    Example

    mask('1234567890', 3); // '*******890'
    

    Example

    mask('1234567890', -4, '$'); // '$$$$567890'
    

    Parameters

    • str: string
    • Optional num: number = 4
    • Optional replaceValue: string = "*"

    Returns string

Generated using TypeDoc