Skip to main content
Module

x/cheerio/types.ts>Cheerio

Cheerio port to Deno with typings
Go to Latest
interface Cheerio
import { type Cheerio } from "https://deno.land/x/cheerio@1.0.3/types.ts";

Index Signatures

[index: number]: Element

Properties

cheerio: string
length: number

Methods

attr(): { [attr: string]: string; }
attr(name: string): string | undefined
attr<T>(name: string, value: AttrFunction<T>): Cheerio
attr(name: string, value: string): Cheerio
attr(map: { [key: string]: unknown; }): Cheerio
data(): { [key: string]: string | number | boolean; }
data(name: string):
| string
| number
| boolean
| undefined
data(name: string, value: string | number | boolean): Cheerio
val(): string
val(value: string): Cheerio
removeAttr(name: string): Cheerio
has(selector: string): Cheerio
has(element: Element): Cheerio
hasClass(className: string): boolean
addClass(classNames: string): Cheerio
removeClass(): Cheerio
removeClass(className: string): Cheerio
removeClass(func: (index: number, className: string) => string): Cheerio
toggleClass(className: string): Cheerio
toggleClass(className: string, toggleSwitch: boolean): Cheerio
toggleClass(toggleSwitch?: boolean): Cheerio
toggleClass(func: (
index: number,
className: string,
toggleSwitch: boolean,
) => string
, toggleSwitch?: boolean
): Cheerio
is(selector: string): boolean
is(element: Element): boolean
is(element: Element[]): boolean
is(selection: Cheerio): boolean
is(func: (index: number, element: Element) => boolean): boolean
serialize(): string
serializeArray(): { name: string; value: string; }[]
find(selector: string): Cheerio
find(element: Cheerio): Cheerio
parent(selector?: string): Cheerio
parents(selector?: string): Cheerio
parentsUntil(selector?: string, filter?: string): Cheerio
parentsUntil(element: Element, filter?: string): Cheerio
parentsUntil(element: Cheerio, filter?: string): Cheerio
prop<T>(name: string): T
prop<T>(name: string, value: T): Cheerio
closest(): Cheerio
closest(selector: string): Cheerio
next(selector?: string): Cheerio
nextAll(): Cheerio
nextAll(selector: string): Cheerio
nextUntil(selector?: string, filter?: string): Cheerio
nextUntil(element: Element, filter?: string): Cheerio
nextUntil(element: Cheerio, filter?: string): Cheerio
prev(selector?: string): Cheerio
prevAll(): Cheerio
prevAll(selector: string): Cheerio
prevUntil(selector?: string, filter?: string): Cheerio
prevUntil(element: Element, filter?: string): Cheerio
prevUntil(element: Cheerio, filter?: string): Cheerio
slice(start: number, end?: number): Cheerio
siblings(selector?: string): Cheerio
children(selector?: string): Cheerio
contents(): Cheerio
each(func: (index: number, element: Element) => void): Cheerio
map<T>(func: (index: number, element: Element) => T): Cheerio
filter(selector: string): Cheerio
filter(selection: Cheerio): Cheerio
filter(element: Element): Cheerio
filter(elements: Element[]): Cheerio
filter(func: (index: number, element: Element) => boolean): Cheerio
not(selector: string): Cheerio
not(selection: Cheerio): Cheerio
not(element: Element): Cheerio
not(func: (index: number, element: Element) => boolean): Cheerio
first(): Cheerio
last(): Cheerio
eq(index: number): Cheerio
get<T>(): T[]
get<T>(index: number): T
index(): number
index(selector: string): number
index(selection: Cheerio): number
end(): Cheerio
add(selectorOrHtml: string): Cheerio
add(selector: string, context: Document): Cheerio
add(element: Element): Cheerio
add(elements: Element[]): Cheerio
add(selection: Cheerio): Cheerio
addBack(): Cheerio
addBack(filter: string): Cheerio
appendTo(target: Cheerio): Cheerio
prependTo(target: Cheerio): Cheerio
append<T>(content: string, ...contents: T[]): Cheerio
append<T>(content: Document, ...contents: T[]): Cheerio
append<T>(content: Document[], ...contents: T[]): Cheerio
append<T>(content: Cheerio, ...contents: T[]): Cheerio
prepend<T>(content: string, ...contents: T[]): Cheerio
prepend<T>(content: Document, ...contents: T[]): Cheerio
prepend<T>(content: Document[], ...contents: T[]): Cheerio
prepend<T>(content: Cheerio, ...contents: T[]): Cheerio
after<T>(content: string, ...contents: T[]): Cheerio
after<T>(content: Document, ...contents: T[]): Cheerio
after<T>(content: Document[], ...contents: T[]): Cheerio
after<T>(content: Cheerio, ...contents: T[]): Cheerio
insertAfter(content: string): Cheerio
insertAfter(content: Document): Cheerio
insertAfter(content: Cheerio): Cheerio
before<T>(content: string, ...contents: T[]): Cheerio
before<T>(content: Document, ...contents: T[]): Cheerio
before<T>(content: Document[], ...contents: T[]): Cheerio
before<T>(content: Cheerio, ...contents: T[]): Cheerio
insertBefore(content: string): Cheerio
insertBefore(content: Document): Cheerio
insertBefore(content: Cheerio): Cheerio
remove(selector?: string): Cheerio
replaceWith(content: string): Cheerio
replaceWith(content: Element): Cheerio
replaceWith(content: Element[]): Cheerio
replaceWith(content: Cheerio): Cheerio
replaceWith(content: () => Cheerio): Cheerio
empty(): Cheerio
html(): string | null
html(html: string): Cheerio
text(): string
text(text: string): Cheerio
wrap(content: string): Cheerio
wrap(content: Document): Cheerio
wrap(content: Cheerio): Cheerio
css(propertyName: string): string
css(propertyNames: string[]): string[]
css(propertyName: string, value: string): Cheerio
css(propertyName: string, value: number): Cheerio
css(propertyName: string, func: (index: number, value: string) => string): Cheerio
css(propertyName: string, func: (index: number, value: string) => number): Cheerio
css(properties: Record<string, unknown>): Cheerio
clone(): Cheerio
toArray(): Element[]