(arg)
| 6 | * @returns {boolean} True if the method can have a body (PATCH, POST, PUT), false otherwise |
| 7 | */ |
| 8 | export function hasBody (arg) { |
| 9 | const trimmed = arg.trim().toUpperCase(); |
| 10 | |
| 11 | // Check for exact matches first |
| 12 | if (trimmed === PATCH || trimmed === POST || trimmed === PUT) { |
| 13 | return true; |
| 14 | } |
| 15 | |
| 16 | // For comma-delimited strings, split and check each method |
| 17 | const methods = trimmed.split(",").map(method => method.trim()); |
| 18 | |
| 19 | return methods.some(method => method === PATCH || method === POST || method === PUT); |
| 20 | } |
no outgoing calls
no test coverage detected