cheerio

Members

# (static) version :string

An identifier describing the version of Cheerio which has been executed.

Type:
  • string
Source:

Methods

# (static) contains() → {boolean}

In order to promote consistency with the jQuery library, users are encouraged to instead use the static method of the same name.

Deprecated:
  • Yes
Source:
Returns:
Type
boolean
Example
var $ = cheerio.load('<div><p></p></div>');
  $.contains($('div').get(0), $('p').get(0)); // true
  $.contains($('p').get(0), $('div').get(0)); // false

# (static) merge()

In order to promote consistency with the jQuery library, users are encouraged to instead use the static method of the same name.

Deprecated:
  • Yes
Source:
Example
var $ = cheerio.load('');
  $.merge([1, 2], [3, 4]); // [1, 2, 3, 4]

# (static) parseHTML()

In order to promote consistency with the jQuery library, users are encouraged to instead use the static method of the same name as it is defined on the "loaded" Cheerio factory function.

Deprecated:
  • See static/parseHTML.
Source:
Example
var $ = cheerio.load('');
  $.parseHTML('<b>markup</b>');

# (static) root()

Users seeking to access the top-level element of a parsed document should instead use the root static method of a "loaded" Cheerio function.

Deprecated:
  • Yes
Source:
Example
var $ = cheerio.load('');
  $.root();