(base, maybePath)
| 712 | } |
| 713 | |
| 714 | function joinUrl(base, maybePath) { |
| 715 | const normalizedBase = base.endsWith('/') ? base.slice(0, -1) : base |
| 716 | const normalizedPath = maybePath.startsWith('/') ? maybePath : `/${maybePath}` |
| 717 | return `${normalizedBase}${normalizedPath}` |
| 718 | } |
| 719 | |
| 720 | function writeJson(res, statusCode, data) { |
| 721 | res.statusCode = statusCode |
no outgoing calls
no test coverage detected