Cheerio port to Deno with typings
import { cheerio } from "https://deno.land/x/[email protected]/mod.ts";
const $ = cheerio.load(html);
$("content").text();
- 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 ofcheerio.load(html)
- Root is callable, Cheerio can be used for methods, so as they are mixed, they allow for $ to be used normally.
If you feel you can fix, upgrade or improve this, just do it.
Be aware that this module imports from https://dev.jspm.io/[email protected]
If JSPM moves that link, this port is done for. :)