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

Limits the number of class-combinations to avoid freeze #23

Merged
merged 3 commits into from
Feb 20, 2017
Merged

Limits the number of class-combinations to avoid freeze #23

merged 3 commits into from
Feb 20, 2017

Conversation

vwochnik
Copy link
Contributor

This is especially useful for the modernizr sites which have dozens of classes attached to their <html> element.

@vwochnik
Copy link
Contributor Author

Please merge this. It will fix the freeze when there are many classes on one element.

@@ -0,0 +1,31 @@
function kCombinations( result, items, data, start, end, index, k )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing jsdoc block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will create one.

/**
* Returns all the possible selector combinations
*/
export function getCombinations( items, k )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls add jsdoc block (@param, @returns)

@@ -35,6 +35,15 @@ describe( 'Unique Selector Tests', () =>
expect( uniqueSelector ).to.equal( 'body > :nth-child(1)' );
} );

it( 'Classes', () =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should explain what is testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I named the tests after your tests which are not any more descriptive than this one either.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I see, there are not more descriptive indeed. Sorry, I cant remember the codebase, I havent work on the project the last months.

@AvraamMavridis AvraamMavridis merged commit ab9f076 into ericclemmons:master Feb 20, 2017
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

Successfully merging this pull request may close these issues.

2 participants