/** * @see https://stackoverflow.com/a/6969486 * @param {string} * @returns {string} */ export const regExpEscape = str => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');