OptionalcharCharacter used for masking (default: '*')
OptionalisCustom function to determine if a property is sensitive. If returns true, the property value will be masked.
The property name
The property value
Dot-notation path (e.g. "user.payment.card")
Current nesting level
true if the property should be masked
OptionalkeysList of property keys to mask (checked at any depth). These keys will be masked wherever they appear in the object tree.
OptionalmaskWhether to mask array elements (default: true). When false, arrays are traversed but individual array items are not masked.
OptionalmaskCustom function to mask a property value. If provided, this function is called for masked properties instead of using default masking.
The value to mask
The property name
Dot-notation path
The masked value (typically a string)
OptionalmaxMaximum nesting depth (default: 100, Infinity for unlimited). Beyond this depth, objects are not traversed further.
OptionalshouldCustom function to determine if traversal should skip descending into an object. Useful for skipping special objects like GeoJSON geometries, DOM nodes, etc.
The object/array to potentially skip
Dot-notation path
Current nesting level
true to skip descending into this object
Options for masking sensitive properties in objects.