(rawValue = '')
| 613 | } |
| 614 | |
| 615 | function normalizeCloudflareDomain(rawValue = '') { |
| 616 | let value = String(rawValue || '').trim().toLowerCase(); |
| 617 | if (!value) return ''; |
| 618 | value = value.replace(/^@+/, ''); |
| 619 | value = value.replace(/^https?:\/\//, ''); |
| 620 | value = value.replace(/\/.*$/, ''); |
| 621 | if (!/^[a-z0-9.-]+\.[a-z]{2,}$/.test(value)) return ''; |
| 622 | return value; |
| 623 | } |
| 624 | |
| 625 | function normalizeCloudflareDomains(values) { |
| 626 | const normalizedDomains = []; |
no outgoing calls
no test coverage detected