(str: string)
| 52 | * @returns The escaped string safe for use in RegExp |
| 53 | */ |
| 54 | export const escapeRegexCharacters = (str: string): string => { |
| 55 | return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| 56 | }; |
| 57 | |
| 58 | export const pluralize = (word: string, count: number, append = 's') => |
| 59 | `${word}${count === 1 ? '' : append}`; |
no test coverage detected