diff --git a/src/Enum/README.md b/src/Enum/README.md index 0008c1f..96ef3cc 100644 --- a/src/Enum/README.md +++ b/src/Enum/README.md @@ -260,14 +260,12 @@ Here's a more advance usage of the converter to highlight how you can configure use Bakame\Aide\Enum\JavascriptConverter; use Illuminate\Support\Str; -$pascalCase = fn (string $word): string => Str::ucfirst(Str::camel($word))); - $converter = JavascriptConverter::new() ->useImmutability() ->useExportDefault() ->useSymbol() ->intendSize(4) - ->propertyNameCase(fn (string $name) => $pascalCase(str_replace('HTTP_', '', $name))); + ->propertyNameCase(fn (string $name) => Str::studly(str_replace('HTTP_', '', $name))); echo $converter->convertToObject(HttpStatusCode::class);