(src: string | undefined)
| 144 | }; |
| 145 | |
| 146 | export const getSrc = (src: string | undefined) => { |
| 147 | if (isStr(src)) { |
| 148 | src = src.trim(); |
| 149 | if (isSrc(src)) { |
| 150 | return src; |
| 151 | } |
| 152 | } |
| 153 | return null; |
| 154 | }; |
| 155 | |
| 156 | export const isSrc = (str: string) => str.length > 0 && /(\/|\.)/.test(str); |
| 157 |
no test coverage detected
searching dependent graphs…