(arg: string | string[])
| 45 | } |
| 46 | |
| 47 | export function endpointPath(arg: string | string[]) { |
| 48 | // if the argument count is even, the last argument is an id |
| 49 | let a = copyOrSplit(arg); |
| 50 | a = a.filter(e => e !== '*'); |
| 51 | // is it even? |
| 52 | if ((a.length % 2) === 0) { |
| 53 | a.pop(); |
| 54 | } |
| 55 | return a.join('/'); |
| 56 | } |
| 57 | |
| 58 | export function splitOptions(args: any[]) { |
| 59 | // keep defined arguments only |
no test coverage detected