@types/css-selector-tokenizer

  • Version 0.7.0
  • Published
  • 5.89 kB
  • No dependencies
  • MIT license

Install

npm i @types/css-selector-tokenizer
yarn add @types/css-selector-tokenizer
pnpm add @types/css-selector-tokenizer

Overview

TypeScript definitions for css-selector-tokenizer

Index

Functions

function parse

parse: (selectors: string) => SelectorsNode;

    function parseValues

    parseValues: (values: string) => ValuesNode;

      function stringify

      stringify: (node: SelectorsNode) => string;

        function stringifyValues

        stringifyValues: (node: ValuesNode) => string;

          Interfaces

          interface AttributeNode

          interface AttributeNode extends BaseNode {}

            property content

            content: string;

              property type

              type: 'attribute';

                interface BaseNode

                interface BaseNode {}

                  property after

                  after?: string;

                    property before

                    before?: string;

                      property name

                      name?: string;

                        interface ClassNode

                        interface ClassNode extends BaseNode {}

                          property name

                          name: string;

                            property type

                            type: 'class';

                              interface CommentNode

                              interface CommentNode extends BaseNode {}

                                property content

                                content: string;

                                  property type

                                  type: 'comment';

                                    interface ElementNode

                                    interface ElementNode extends BaseNode {}

                                      property name

                                      name: string;

                                        property namespace

                                        namespace?: string;

                                          property type

                                          type: 'element';

                                            interface IdNode

                                            interface IdNode extends BaseNode {}

                                              property name

                                              name: string;

                                                property type

                                                type: 'id';

                                                  interface InvalidNode

                                                  interface InvalidNode extends BaseNode {}

                                                    property type

                                                    type: 'invalid';

                                                      property value

                                                      value: string;

                                                        interface ItemNode

                                                        interface ItemNode extends BaseNode {}

                                                          property name

                                                          name: string;

                                                            property type

                                                            type: 'item';

                                                              interface NestedItemNode

                                                              interface NestedItemNode extends BaseNode {}

                                                                property name

                                                                name: string;

                                                                  property nodes

                                                                  nodes: ValueNode[];

                                                                    property type

                                                                    type: 'nested-item';

                                                                      interface NestedPseudoClassNode

                                                                      interface NestedPseudoClassNode extends BaseNode {}

                                                                        property name

                                                                        name: string;

                                                                          property nodes

                                                                          nodes: SelectorNode[];

                                                                            property type

                                                                            type: 'nested-pseudo-class';

                                                                              interface OperatorNode

                                                                              interface OperatorNode extends BaseNode {}

                                                                                property operator

                                                                                operator: string;

                                                                                  property type

                                                                                  type: 'operator';

                                                                                    interface PseudoClassNode

                                                                                    interface PseudoClassNode extends BaseNode {}

                                                                                      property content

                                                                                      content?: string;

                                                                                        property name

                                                                                        name: string;

                                                                                          property type

                                                                                          type: 'pseudo-class';

                                                                                            interface PseudoElementNode

                                                                                            interface PseudoElementNode extends BaseNode {}

                                                                                              property name

                                                                                              name: string;

                                                                                                property type

                                                                                                type: 'pseudo-element';

                                                                                                  interface SelectorNode

                                                                                                  interface SelectorNode extends BaseNode {}

                                                                                                    property nodes

                                                                                                    nodes: SelectorNodeType[];

                                                                                                      property type

                                                                                                      type: 'selector';

                                                                                                        interface SelectorsNode

                                                                                                        interface SelectorsNode extends BaseNode {}

                                                                                                          property nodes

                                                                                                          nodes: SelectorNode[];

                                                                                                            property type

                                                                                                            type: 'selectors';

                                                                                                              interface SpacingNode

                                                                                                              interface SpacingNode extends BaseNode {}

                                                                                                                property type

                                                                                                                type: 'spacing';

                                                                                                                  property value

                                                                                                                  value: string;

                                                                                                                    interface StringNode

                                                                                                                    interface StringNode extends BaseNode {}

                                                                                                                      property stringType

                                                                                                                      stringType: string;

                                                                                                                        property type

                                                                                                                        type: 'string';

                                                                                                                          property value

                                                                                                                          value: string;

                                                                                                                            interface UniversalNode

                                                                                                                            interface UniversalNode extends BaseNode {}

                                                                                                                              property namespace

                                                                                                                              namespace?: string;

                                                                                                                                property type

                                                                                                                                type: 'universal';

                                                                                                                                  interface UrlNode

                                                                                                                                  interface UrlNode extends BaseNode {}

                                                                                                                                    property innerSpacingAfter

                                                                                                                                    innerSpacingAfter?: string;

                                                                                                                                      property innerSpacingBefore

                                                                                                                                      innerSpacingBefore?: string;

                                                                                                                                        property stringType

                                                                                                                                        stringType?: string;

                                                                                                                                          property type

                                                                                                                                          type: 'url';

                                                                                                                                            property url

                                                                                                                                            url: string;

                                                                                                                                              interface ValueNode

                                                                                                                                              interface ValueNode extends BaseNode {}

                                                                                                                                                property nodes

                                                                                                                                                nodes: ValueNodeType[];

                                                                                                                                                  property type

                                                                                                                                                  type: 'value';

                                                                                                                                                    interface ValuesNode

                                                                                                                                                    interface ValuesNode extends BaseNode {}

                                                                                                                                                      property nodes

                                                                                                                                                      nodes: ValueNode[];

                                                                                                                                                        property type

                                                                                                                                                        type: 'values';

                                                                                                                                                          Type Aliases

                                                                                                                                                          type AnySelectorNode

                                                                                                                                                          type AnySelectorNode = SelectorsNode | SelectorNode | SelectorNodeType;
                                                                                                                                                          • Any node returned by parse. Useful for walk implementations.

                                                                                                                                                          type AnyValueNode

                                                                                                                                                          type AnyValueNode = ValuesNode | ValueNode | ValueNodeType;
                                                                                                                                                          • Any node returned by parseValues. Useful for walk implementations.

                                                                                                                                                          type SelectorNodeType

                                                                                                                                                          type SelectorNodeType =
                                                                                                                                                          | ElementNode
                                                                                                                                                          | ClassNode
                                                                                                                                                          | SpacingNode
                                                                                                                                                          | IdNode
                                                                                                                                                          | PseudoClassNode
                                                                                                                                                          | NestedPseudoClassNode
                                                                                                                                                          | UniversalNode
                                                                                                                                                          | AttributeNode
                                                                                                                                                          | CommentNode
                                                                                                                                                          | OperatorNode
                                                                                                                                                          | InvalidNode
                                                                                                                                                          | PseudoElementNode;
                                                                                                                                                          • Any node that can be child of SelectorNode.

                                                                                                                                                          type ValueNodeType

                                                                                                                                                          type ValueNodeType =
                                                                                                                                                          | ItemNode
                                                                                                                                                          | NestedItemNode
                                                                                                                                                          | StringNode
                                                                                                                                                          | CommentNode
                                                                                                                                                          | UrlNode
                                                                                                                                                          | InvalidNode;
                                                                                                                                                          • Any node that can be child of ValueNode.

                                                                                                                                                          Package Files (1)

                                                                                                                                                          Dependencies (0)

                                                                                                                                                          No dependencies.

                                                                                                                                                          Dev Dependencies (0)

                                                                                                                                                          No dev dependencies.

                                                                                                                                                          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/@types/css-selector-tokenizer.

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