Skip to main content
Latest
function cheerio.text
import { cheerio } from "https://deno.land/x/deno_temme@v1.0.0/deps.ts";
const { text } = cheerio;

Render the document as text.

This returns the textContent of the passed elements. The result will include the contents of script and stype elements. To avoid this, use .prop('innerText') instead.

Parameters

this: CheerioAPI | void
  • Elements to render.
optional
elements: ArrayLike<AnyNode>

Returns

string

The rendered document.