UNPKG

@tsed/cli

Version:
8 lines (7 loc) 270 B
import { getValue } from "@tsed/core"; export function hasValue(expression, value) { return (ctx) => [].concat(value).includes(getValue(expression, ctx)); } export function hasFeature(feature) { return (ctx) => !!ctx.features.find((item) => item === feature); }