Important deprecation clarification

At the moment, cheerio can be imported into Deno directly by using

Note from @artze:

Do take note that, cheerio from v1.0.0 onwards can be imported in a deno app directly with import * as cheerio from "" without this deno-cheerio wrapper.

This fact makes this current module irrelevant and deprecated.

Cheerio works on Deno out of the box by importing it directly from ESM.

If ESM were to change things, and importing directly from it were to no longer become possible (unlikely but who knows), I will accept pull requests in this module to keep Cheerio going on Deno.

Until then, consider this module deprecated and legacy and use ESM. You're free to use this module but there's no point to that.


Cheerio port to Deno with typings

How to use

// Option 1 (preferred): from ESM
import * as cheerio from "";

const $ = cheerio.load(html);

Another import option:

// from denoland (unnecessary but do as you wish)
import { cheerio } from "";

Old (legacy) port process:

  • I just copied DefinitelyTyped/cheerio
  • erased some node and npm specifics that caused errors.
  • removed global namespace cuz why not
  • exported all interfaces (typings previously relied on tsc ambient import from .d.ts)
  • added & Cheerio to the normal returned value of cheerio.load(html)
    • Root is callable, Cheerio can be used for methods, so as they are mixed, they allow for $ to be used normally.

Current port process

  • @artze removed all old port stuff (PR)
  • Imported from esm
import * as cheerio from "";
export { cheerio };

Pull-requests are welcome.

If you feel you can fix, upgrade or improve this, just do it.

Depends on

Be aware that this module imports from

If esm moves that link, this port is done for. :)