cheerio-select

  • Version 2.1.0
  • Published
  • 62.6 kB
  • 6 dependencies
  • BSD-2-Clause license

Install

npm i cheerio-select
yarn add cheerio-select
pnpm add cheerio-select

Overview

CSS selector engine supporting jQuery selectors

Index

Functions

function filter

filter: (selector: string, elements: AnyNode[], options?: Options) => Element[];

    function is

    is: (
    element: Element,
    selector: string | ((el: Element) => boolean),
    options?: Options
    ) => boolean;

      function select

      select: (
      selector: string | ((el: Element) => boolean),
      root: AnyNode | AnyNode[],
      options?: Options,
      limit?: number
      ) => Element[];

        function some

        some: (
        elements: Element[],
        selector: string | ((el: Element) => boolean),
        options?: Options
        ) => boolean;

          Interfaces

          interface Options

          interface Options extends CSSSelectOptions<AnyNode, Element> {}

            property root

            root?: Document;
            • Optional reference to the root of the document. If not set, this will be computed when needed.

            Package Files (1)

            Dependencies (6)

            Dev Dependencies (12)

            Peer Dependencies (0)

            No peer dependencies.

            Badge

            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/cheerio-select.

            • Markdown
              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/cheerio-select)
            • HTML
              <a href="https://www.jsdocs.io/package/cheerio-select"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>