-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Wrapper function for functions with similar functionality #1662
Conversation
Hi @5saviahv, this is an awesome idea, thanks for opening this PR! I just started a new job, so might need some time to review this properly – sorry about that. Also no need to rebase the PR (that is great, but GitHub can deal with it). |
Thanks for telling, take your time - in jQuery there are many such functions, it reduces repeating same constructs over and over. |
|
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.
This is a great idea! Right now, it will lead to a slowdown due to uniqueSort
being used quite a bit, when some of the results were taken without a change before. I've left some comments, let me know if they are useful.
Sry, |
I added Cheerio-Select #7 and it is related to this. We can later come back and change how |
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.
I added cheeriojs/cheerio-select#7 and it is related to this. We can later come back and change how uniqueSort works.
I have updated cheerio-select's filter
method to no longer change the order of the input. That hopefully (?) removes the need for sorting in here entirely.
Wrapper function "_matcher" for functions with similar functionality.
other functions work like before, simply repeating parts of the functions are kept in "wrapper" function