Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/utils/masking

lib/utils/masking

Provides utility functions for masking PII (Personally Identifiable Information) in logs.

This module contains helpers for masking sensitive data like email addresses to prevent PII from appearing in log files while still maintaining enough information for debugging purposes.

Functions

maskEmail()

maskEmail(email): string

Masks an email address for logging purposes.

Shows first 2 characters of local part, masks the rest. Shows first 2 characters of domain, masks until TLD.

Parameters

email

string

Returns

string

Example

maskEmail("john.doe@example.com") // "jo***@ex***.com" maskEmail("ab@cd.org") // "ab***@cd***.org" maskEmail("x@y.io") // "***@***.io"
Last updated on