Skip to content
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

Refactor sorting.pipe.ts #820

Open
whyboris opened this issue Sep 1, 2023 · 2 comments
Open

Refactor sorting.pipe.ts #820

whyboris opened this issue Sep 1, 2023 · 2 comments

Comments

@whyboris
Copy link
Owner

whyboris commented Sep 1, 2023

Seems like there is a lot of redundancy here: https://github.com/whyboris/Video-Hub-App/blob/main/src/app/pipes/sorting.pipe.ts#L196

Seems like I could create a dictionary from sortingType (e.g. timeAsc) to the sort property (e.g. duration) and reduce the whole if/then mess to a single "if in set of sortingType" perform the search with map.get("timeAsc") 🤔

ps - rename duplicateFinder.pipe.ts using kebab-case

@NabilBouazzaoui
Copy link

Hi, can i take this issue ?

@whyboris
Copy link
Owner Author

whyboris commented Sep 9, 2023

Thank you for the offer @NabilBouazzaoui 👍

I'm happy to answer any questions you have about making this change 🤝

If you write some code, feel free to submit your PR in whatever form you have - even partial work is a welcome contribution 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants