EarnMorev1.0.0

scrubCustomerData

scrubCustomerData(info: CustomerInfo): void

Source: hash.ts:83

Scrubs a CustomerInfo object by overwriting its string fields with zeroes.

In JavaScript, memory cannot be manually freed, but mutating the string properties in-place ensures the original PII is removed from the active object immediately before the garbage collector reclaims it. This aids in complying with data minimization and Right to be Forgotten principles in environments where memory dumps could expose PII.

Note: Strings in JS are immutable. This sets the property to a NEW string of zeroes. The original string becomes eligible for GC immediately.

Parameters

Returns

  • void