(arr)
| 14151 | return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") |
| 14152 | } |
| 14153 | static sum(arr) { |
| 14154 | return arr.reduce((curr, next) => curr + next, 0) |
| 14155 | } |
| 14156 | static removeNonAscii(str) { |
| 14157 | // https://stackoverflow.com/questions/20856197/remove-non-ascii-character-in-string |
| 14158 | return str.replace(/[^\x00-\x7F]/g, "") |