swc/crates/swc_bundler/tests/.cache/deno/c870059092be4b5fbad851363384611d318b8eb4.ts
2021-11-09 20:42:49 +09:00

14 lines
355 B
TypeScript

// Loaded from https://deno.land/x/case@v2.1.0/titleCase.ts
import upperCase from "./upperCase.ts";
import normalCase from "./normalCase.ts";
export default function titleCase(value: string, locale?: string): string {
return normalCase(value, locale).replace(/^.| ./g, function (
m: string,
): string {
return upperCase(m, locale);
});
}