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