(str: string, increment: number)
| 99 | const digitsRegex = /\d+/; |
| 100 | |
| 101 | const replaceDigitsWithIncrement = (str: string, increment: number): string => { |
| 102 | const match = str.match(digitsRegex); |
| 103 | if (!match) { |
| 104 | return str; |
| 105 | } |
| 106 | return str.replace(match[0], `${parseInt(match[0], 10) + increment}`); |
| 107 | }; |
| 108 | |
| 109 | const sidebarRenderedWidth = 44; |
| 110 | const sidebarOpenWidth = 240; |
no test coverage detected