see https const RESERVED_CHARACTERS = { escape : [ "\\\\" , "\\/" , "\\+" , "\\-" , "\\=" , "\\&\\&" , "\\|\\|" , "\\!" , "\\(" , "\\)" , "\\{" , "\\}" , "\\[" , "\\]" , "\\^" , '\\"' , "\\~" , "\\*" , "\\?" , "\\:" , "\\>" , "\\<" ] } ; export const normalizeValue = ( value ) => { let result = value ; for ( const character of RESERVED_CHARACTERS . escape ) { result = result . replace ( new RegExp ( `${ character }` , "g" ) , ` ` ) ; } return result ? `*${ result }*` : "" ; } ;