UNPKG

header-case

Version:
9 lines 330 B
import { split, toLower, toUpper } from "no-case"; export function headerCase(input, options) { const lower = toLower(options?.locale); const upper = toUpper(options?.locale); return split(input, options) .map((x) => `${upper(x[0])}${lower(x.slice(1))}`) .join("-"); } //# sourceMappingURL=index.js.map