1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import { ASTNode as Node } from 'parse5';
|
15 | export { ASTNode as Node } from 'parse5';
|
16 | export declare type Predicate = (node: Node) => boolean;
|
17 | export declare function hasSpaceSeparatedAttrValue(name: string, value: string): Predicate;
|
18 | export declare function isDocument(node: Node): boolean;
|
19 | export declare function isDocumentFragment(node: Node): boolean;
|
20 | export declare function isElement(node: Node): boolean;
|
21 | export declare function isTextNode(node: Node): boolean;
|
22 | export declare function isCommentNode(node: Node): boolean;
|
23 | export declare const predicates: {
|
24 | hasClass: (name: string) => Predicate;
|
25 | hasAttr: (attr: string) => Predicate;
|
26 | hasAttrValue: (attr: string, value: string) => Predicate;
|
27 | hasMatchingTagName: (regex: RegExp) => Predicate;
|
28 | hasSpaceSeparatedAttrValue: typeof hasSpaceSeparatedAttrValue;
|
29 | hasTagName: (name: string) => Predicate;
|
30 | hasTextValue: (value: string) => Predicate;
|
31 | AND: (...predicates: Predicate[]) => Predicate;
|
32 | OR: (...predicates: Predicate[]) => Predicate;
|
33 | NOT: (predicateFn: Predicate) => Predicate;
|
34 | parentMatches: (predicateFn: Predicate) => Predicate;
|
35 | };
|