UNPKG

erebus-sdk

Version:

To install dependencies:

3 lines 517 B
function r(o){if(!o)throw new Error("Missing Erebus webhook URL. Set it in _options or as NEXT_PUBLIC_EREBUS_GRANT_WEBHOOK_URL env.");try{let t=new URL(o);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Error("Invalid webhook protocol. URL must start with http:// or https://");return t}catch{throw new Error("Erebus grant webhook URL is invalid. Provide a valid http:// or https:// URL.")}} export{r as validateHttpUrl};//# sourceMappingURL=validateHttpUrl.js.map //# sourceMappingURL=validateHttpUrl.js.map