UNPKG

@tsed/cli

Version:
12 lines (11 loc) 355 B
import { camelCase } from "change-case"; import { mapUniqFeatures } from "./mapUniqFeatures.js"; export function mapToContext(options) { options = mapUniqFeatures(options); options.features.forEach((feature) => { feature.split(":").forEach((type) => { options[camelCase(type)] = true; }); }); return options; }