query-html

1.0.0 • Public • Published

NPM Version

Buy Me A Coffee

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

Package Sidebar

Install

npm i query-html

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

6.15 kB

Total Files

5

Last publish

Collaborators

  • dijs