Optional
value: null | stringstring value to be masked.
Optional
maskOptions: MaskOptionsOptions to determine how masking should be performed.
either a masked string or an original string if keywords array is empty or undefined.
const maskedString = defaultMaskMiddleware('Mask "this value" because string has a secret keyword', { keywords: ['secret'] });
console.log(maskedString); //'Mask ****** because string has a secret keyword'
Generated using TypeDoc
Takes a string and masks values in quotes if at least one keyword is present in value string.