mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 20:22:26 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
15 lines
290 B
TypeScript
15 lines
290 B
TypeScript
// Loaded from https://deno.land/x/case/upperFirstCase.ts
|
|
|
|
|
|
import upperCase from "./upperCase.ts";
|
|
|
|
export default function (str: string, locale?: string): string {
|
|
if (str == null) {
|
|
return "";
|
|
}
|
|
|
|
str = String(str);
|
|
|
|
return upperCase(str.charAt(0), locale) + str.substr(1);
|
|
}
|