Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Cheerio<T>

Type parameters

  • T = unknown

Hierarchy

  • Cheerio

Indexable

[index: number]: Element

Index

Properties

cheerio

cheerio: string

length

length: number

Methods

add

addBack

addClass

  • addClass(classNames: string): Cheerio

after

  • after(content: string, ...contents: unknown[]): Cheerio
  • after(content: Document, ...contents: unknown[]): Cheerio
  • after(content: Document[], ...contents: unknown[]): Cheerio
  • after(content: Cheerio, ...contents: unknown[]): Cheerio

append

  • append(content: string, ...contents: unknown[]): Cheerio
  • append(content: Document, ...contents: unknown[]): Cheerio
  • append(content: Document[], ...contents: unknown[]): Cheerio
  • append(content: Cheerio, ...contents: unknown[]): Cheerio

appendTo

attr

  • attr(): {}
  • attr(name: string): string | undefined
  • attr(name: string, value: AttrFunction): Cheerio
  • attr(name: string, value: string): Cheerio
  • attr(map: {}): Cheerio

before

  • before(content: string, ...contents: unknown[]): Cheerio
  • before(content: Document, ...contents: unknown[]): Cheerio
  • before(content: Document[], ...contents: unknown[]): Cheerio
  • before(content: Cheerio, ...contents: unknown[]): Cheerio

children

  • children(selector?: string): Cheerio

clone

closest

contents

css

  • 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, string>): Cheerio

data

  • data(): unknown
  • data(name: string): unknown
  • data(name: string, value: unknown): unknown

each

empty

end

eq

filter

find

first

get

  • get(): T[]
  • get(index: number): T

has

hasClass

  • hasClass(className: string): boolean

html

  • html(): string | null
  • html(html: string): Cheerio

index

  • index(): number
  • index(selector: string): number
  • index(selection: Cheerio): number

insertAfter

insertBefore

is

  • is(selector: string): boolean
  • is(element: Element): boolean
  • is(element: Element[]): boolean
  • is(selection: Cheerio): boolean
  • is(func: (index: number, element: Element) => boolean): boolean

last

map

next

nextAll

nextUntil

not

parent

  • parent(selector?: string): Cheerio

parents

  • parents(selector?: string): Cheerio

parentsUntil

prepend

  • prepend(content: string, ...contents: unknown[]): Cheerio
  • prepend(content: Document, ...contents: unknown[]): Cheerio
  • prepend(content: Document[], ...contents: unknown[]): Cheerio
  • prepend(content: Cheerio, ...contents: unknown[]): Cheerio

prependTo

prev

prevAll

prevUntil

prop

  • prop(name: string): unknown
  • prop(name: string, value: unknown): Cheerio

remove

  • remove(selector?: string): Cheerio

removeAttr

  • removeAttr(name: string): Cheerio

removeClass

  • removeClass(): Cheerio
  • removeClass(className: string): Cheerio
  • removeClass(func: (index: number, className: string) => string): Cheerio

replaceWith

serialize

  • serialize(): string

serializeArray

  • serializeArray(): { name: string; value: string }[]

siblings

  • siblings(selector?: string): Cheerio

slice

  • slice(start: number, end?: number): Cheerio

text

  • text(): string
  • text(text: string): Cheerio

toArray

toggleClass

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

    • className: string

    Returns Cheerio

  • Parameters

    • className: string
    • toggleSwitch: boolean

    Returns Cheerio

  • Parameters

    • Optional toggleSwitch: boolean

    Returns Cheerio

  • Parameters

    • func: (index: number, className: string, toggleSwitch: boolean) => string
        • (index: number, className: string, toggleSwitch: boolean): string
        • Parameters

          • index: number
          • className: string
          • toggleSwitch: boolean

          Returns string

    • Optional toggleSwitch: boolean

    Returns Cheerio

val

  • val(): string
  • val(value: string): Cheerio

wrap

Generated using TypeDoc