openapi-eller
openapi-eller copied to clipboard
In the TypeScript target universal-url doesn't work in React Native
Previous versions just had a simple shim for the URL object, something like:
function URL(relative: string, base:string) {
const baseUrl = base.replace(/\/+$/, "")
const relativeUrl = relative.replace(/^\/+/, "")
this.toString = function toString() {
return `${baseUrl}/${relativeUrl}`
}
}