(file)
| 336 | } |
| 337 | |
| 338 | export function isTextPath(file) { |
| 339 | const path = String(file ?? "").split(/[?#]/)[0]; |
| 340 | const basename = path.split(/[\\/]/).pop()?.toLowerCase() || ""; |
| 341 | const lastDot = basename.lastIndexOf("."); |
| 342 | if (lastDot === -1) return false; |
| 343 | return textExtensionSet.has(basename.slice(lastDot + 1)); |
| 344 | } |
| 345 | |
| 346 | export function isBinaryPath(file) { |
| 347 | const path = String(file ?? "").split(/[?#]/)[0]; |
no test coverage detected