1.0.0 • Published 3 years ago

query-html v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

NPM Version

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