Skip to main content
Module

x/cheerio/mod.ts>cheerio.contains

Cheerio port to Deno with typings
Latest
variable cheerio.contains
Deprecated
import { cheerio } from "https://deno.land/x/cheerio@1.0.7/mod.ts";
const { contains } = cheerio;

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

Examples

Example 1

const $ = cheerio.load('<div><p></p></div>');

$.contains($('div').get(0), $('p').get(0));
//=> true

$.contains($('p').get(0), $('div').get(0));
//=> false

type

staticMethods.contains