query-html
v1.0.0
Published
Query HTML with CSS Selectors.
Downloads
2
Readme
QueryHTML is a fast and lightweight HTML query library.
Examples
const query = queryHtml(htmlString);
query.find('.foo').text; // -> inner text of this element
query.find('.foo ul li').eq(3).attr('for'); // -> read attributes
query.find('.foo ul li').first.href; // -> built in support for common attributes
query.find('div a').hasClass('foo'); // -> check for class names
query.find('.foo ul').children; // -> access to child elements in raw form
query.find('.foo ul').name; // -> access element properties
Install
npm install query-html