Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Cheerio

class Cheerio<T> implements ArrayLike<T> {
constructor(
selector?: T extends Node ? BasicAcceptedElems<T> : Cheerio<T> | T[],
context?: BasicAcceptedElems<Node> | null,
options?: InternalOptions,
);
[index: number]: T;
_root: Cheerio<Document> | undefined;
find: Traversing.find;
length: number;
options: InternalOptions;
prevObject: Cheerio<Node> | undefined;
 
_make<T>(dom:
| Cheerio<T>
| T[]
| T
| string
, context?: BasicAcceptedElems<Node>): Cheerio<T>;
}
interface Cheerio <T> extends AttributesType, TraversingType, ManipulationType, CssType, FormsType, Iterable<T> {
cheerio: "[cheerio object]";
splice: Array.prototype.slice;
}

§Type Parameters

§Implements

§
ArrayLike<T>
[src]

§Constructors

§
new Cheerio(selector?: T extends Node ? BasicAcceptedElems<T> : Cheerio<T> | T[], context?: BasicAcceptedElems<Node> | null, root?: BasicAcceptedElems<Document> | null, options?: InternalOptions)
[src]

Instance of cheerio. Methods are specified in the modules. Usage of this constructor is not recommended. Please use $.load instead.

@param selector
  • The new selection.
@param context
  • Context of the selection.
@param root
  • Sets the root node.
@param options
  • Options for the instance.

§Index Signatures

§
[index: number]: T

§Properties

§
_root: Cheerio<Document> | undefined
[src]

The root of the document. Can be set by using the root argument of the constructor.

§
find: Traversing.find
[src]
§
length: number
[src]
§
prevObject: Cheerio<Node> | undefined
[src]

§Methods

§
_make<T>(dom: Cheerio<T> | T[] | T | string, context?: BasicAcceptedElems<Node>): Cheerio<T>
[src]

Make a cheerio object.

@param dom
  • The contents of the new object.
@param context
  • The context of the new object.
@return

The new cheerio object.

§Type Parameters

§Extends

§
AttributesType
[src]
§
TraversingType
[src]
§
ManipulationType
[src]
§
CssType
[src]
§
FormsType
[src]
§
Iterable<T>
[src]

§Properties

§
cheerio: "[cheerio object]"
[src]
§
splice: Array.prototype.slice
[src]