(name: string)
| 63 | } |
| 64 | |
| 65 | function splitIntoWords(name: string): Array<string> { |
| 66 | return name |
| 67 | .replace(/[_\-\s]+/g, ' ') |
| 68 | .replace(/([a-z0-9])([A-Z])/g, '$1 $2') |
| 69 | .toLowerCase() |
| 70 | .split(/\s+/) |
| 71 | .filter(Boolean) |
| 72 | } |
| 73 | |
| 74 | function looksLikeSecret(name: string): boolean { |
| 75 | const words = splitIntoWords(name) |
no test coverage detected