(literal: string)
| 260 | * Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#escaping |
| 261 | */ |
| 262 | export function escapeRegExp(literal: string) { |
| 263 | return literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Returns all values for given search param name, or a default. |
no test coverage detected