cheerio-select

  • Version 1.5.0
  • Published
  • 22.3 kB
  • 5 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: Node[], options?: Options) => Element[];

    function is

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

      function select

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

        function some

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

          Interfaces

          interface Options

          interface Options extends CSSSelectOptions<Node, 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 (5)

            Dev Dependencies (11)

            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>