Const
Takes a string and masks values in quotes if at least one keyword is present in value string.
string value to be masked.
an array of keyword strings which are looked for in value string.
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' Copy
const maskedString = defaultMaskMiddleware('Mask "this value" because string has a secret keyword', { keywords: ['secret'] });console.log(maskedString); //'Mask ****** because string has a secret keyword'
Takes a string and masks values in quotes if at least one keyword is present in value string.