Skip to content

traceypooh/deno-cheerio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno-cheerio

Cheerio port to Deno with typings

How to use

import { cheerio } from "https://deno.land/x/[email protected]/mod.ts";

const $ = cheerio.load(html);
$("content").text();

Documentation and relevant links

How I ported this

  • 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.

Pull-requests are welcome.

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

Depends on JSPM.io

Be aware that this module imports from https://dev.jspm.io/[email protected]

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

About

Cheerio port to Deno with typings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%