Fix isHTTPMethod validator

master
Garrett Mills 1 year ago
parent bbf2807cfa
commit 37fcaabdef

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.14.9", "version": "0.14.10",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

@ -20,7 +20,7 @@ export type HTTPMethod = 'post' | 'get' | 'patch' | 'put' | 'delete' | 'options'
* @param what * @param what
*/ */
export function isHTTPMethod(what: unknown): what is HTTPMethod { export function isHTTPMethod(what: unknown): what is HTTPMethod {
return ['post', 'get', 'patch', 'put', 'delete'].includes(String(what)) return ['post', 'get', 'patch', 'put', 'delete', 'options'].includes(String(what))
} }
/** /**

Loading…
Cancel
Save