You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sorry if this isn't a feature request or bug but I'm hunting for a way to use cheerio in the fastest possible way and my use case is simple. I just want to find out if an element exists. I don't need the element or know how many there are.
What I'm currently doing is something like this:
const$=cheerio.load(htmlString)cssselectors.forEach(selector=>{if($(selector).length){console.log('It exists!')}else{console.log('Does not exist')}}
In my use case I have hundreds or thousands of CSS selectors and I just want to find out, for each one, if there exists an element at all.
The text was updated successfully, but these errors were encountered:
I'm sorry if this isn't a feature request or bug but I'm hunting for a way to use cheerio in the fastest possible way and my use case is simple. I just want to find out if an element exists. I don't need the element or know how many there are.
What I'm currently doing is something like this:
In my use case I have hundreds or thousands of CSS selectors and I just want to find out, for each one, if there exists an element at all.
The text was updated successfully, but these errors were encountered: