-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up of PathUtil #241
Clean-up of PathUtil #241
Conversation
@eneufeld This is a refactoring I did in my spare time to explore lodash. No issue or whatsoever tracks this. |
* @returns {any} the last fragment in a beautified manner | ||
*/ | ||
static beautifiedLastFragment(schemaPath: string): string { | ||
return _.flow(PathUtil.lastFragment, _.upperFirst, PathUtil.beautify)(schemaPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the _.uperFirst call is not necessary as the beautify method will upper case the string
Thank you, the code is much better readable. I added two small comments, but they should/could be fixed separately as they are improvements |
Small refactoring of PathUtil + JSDoc, also fixed some minor warnings.
Usage of start case when beautifying labels.
Fixed name of inits function, which actually should be named init (as e.g. here).