UNPKG

@httpx/assert

Version:
2 lines 539 B
import {isHttpValidMethod,isHttpMethod}from'./http.guards.mjs';import {formatErrMsg}from'./messages/errorMessages.mjs';import {createAssertException}from'./utils/createAssertException.mjs';function m(t,r){if(!isHttpValidMethod(t))throw createAssertException(r,formatErrMsg("http method",t))}function d(t,r,s){if(!isHttpMethod(t,r))throw createAssertException(s,formatErrMsg(`http '${t}' method`,r))}export{d as assertHttpMethod,m as assertHttpValidMethod};//# sourceMappingURL=http.asserts.mjs.map //# sourceMappingURL=http.asserts.mjs.map