Filtering when meta is Nullish
HmFlashy opened this issue · comments
Hugo Maitre commented
I try to get the methods of all my handlers thanks to the metadata key METHOD_METADATA
but since the methods GET = 0 in the RequestMethod enum
export declare enum RequestMethod {
GET = 0,
POST = 1,
PUT = 2,
DELETE = 3,
PATCH = 4,
ALL = 5,
OPTIONS = 6,
HEAD = 7
}
these methods are filtered
It would be better to do something like this
.filter((x) => !isNull(x.meta)); // from lodash
Jesse Carter commented
Looks good to me. Feel free to open a PR