-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: Use cheerio-select
, to support positional selectors
#1565
Conversation
Required to get support for `Set`.
@@ -4,7 +4,7 @@ | |||
}, | |||
"plugins": ["jsdoc"], | |||
"extends": ["eslint:recommended", "prettier"], | |||
"globals": {}, | |||
"globals": { "Set": true }, |
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.
Set
has been supported since node 0.12
. The minimum node version has been bumped to support this.
}, | ||
"dependencies": { | ||
"css-select": "^3.1.2", | ||
"cheerio-select": "github:cheeriojs/cheerio-select", |
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.
We have a Github reference here, until cheeriojs/cheerio-select#2 is resolved.
// var $h2 = cheerio('<h2>fruits</h2>'); | ||
// console.log($elem.before('hi')); | ||
// console.log($elem.before($h2)); | ||
it('should select first element cheerio(:first)', function () { |
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 test that has been skipped for forever is now finally live 😄
Adds support for jQuery positional selectors (:eq, :first, :not(:last) etc.).
Fixes #1355
Fixes #129