diff --git a/src/Enum/README.md b/src/Enum/README.md index f86f2fc..c168e95 100644 --- a/src/Enum/README.md +++ b/src/Enum/README.md @@ -171,16 +171,16 @@ enum HttpMethod: string #### Convert -The `Convefrt` trait adds two (2) methods to convert Enums instances. +The `Convert` trait adds two (2) methods to convert Enums instances. The `toAssociative` converts the Enum instance into an associative array whereas the `toJavaScript` method converts the Enum into a -Javascript equivalent structure. +JavaScript equivalent structure. ```php convertToObject(HttpStatusCode::class); ``` -will produce the following javascript code snippet: +will produce the following JavaScript code snippet: ```javascript const HttpStatusCode = Object.freeze({ @@ -278,7 +278,7 @@ conversely using `convertToClass` as follows: echo JavaScriptConverter::new()->convertToClass(HttpStatusCode::class); ``` -will produce the following javascript code snippet: +will produce the following JavaScript code snippet: ```javascript class HttpStatusCode { @@ -296,7 +296,7 @@ class HttpStatusCode { Of course there are ways to improve the output depending on your use case you can - ignore or use object immutability; -- ignore or use Javascript `export` or `export default`; +- ignore or use JavaScript `export` or `export default`; - change the class name or add and/or change the object variable name; - use `Symbol` when declaring the object property value; - define indentation spaces and thus end of line; @@ -322,7 +322,7 @@ $converter = JavaScriptConverter::new() echo $converter->convertToObject(HttpStatusCode::class, 'StatusCode'); ``` -will return the following Javascript code: +will return the following JavaScript code: ```javascript const StatusCode = Object.freeze({ @@ -359,7 +359,7 @@ use Bakame\Aide\Enum\JavaScriptConverter; echo JavaScriptConverter::new()->convertToObject(Color::class); ``` -will produce the following javascript code snippet: +will produce the following JavaScript code snippet: ```javascript const Color = Object.freeze({