rahad-media-downloader 2.1.7 → 2.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/.cache/typescript/5.3/node_modules/.package-lock.json +54 -0
  2. package/.cache/typescript/5.3/node_modules/@types/cookie/LICENSE +21 -0
  3. package/.cache/typescript/5.3/node_modules/@types/cookie/README.md +15 -0
  4. package/.cache/typescript/5.3/node_modules/@types/cookie/index.d.ts +154 -0
  5. package/.cache/typescript/5.3/node_modules/@types/cookie/package.json +30 -0
  6. package/.cache/typescript/5.3/node_modules/@types/domhandler/LICENSE +21 -0
  7. package/.cache/typescript/5.3/node_modules/@types/domhandler/README.md +92 -0
  8. package/.cache/typescript/5.3/node_modules/@types/domhandler/index.d.ts +73 -0
  9. package/.cache/typescript/5.3/node_modules/@types/domhandler/package.json +25 -0
  10. package/.cache/typescript/5.3/node_modules/@types/domutils/LICENSE +21 -0
  11. package/.cache/typescript/5.3/node_modules/@types/domutils/README.md +15 -0
  12. package/.cache/typescript/5.3/node_modules/@types/domutils/index.d.ts +124 -0
  13. package/.cache/typescript/5.3/node_modules/@types/domutils/package.json +27 -0
  14. package/.cache/typescript/5.3/node_modules/@types/htmlparser2/LICENSE +21 -0
  15. package/.cache/typescript/5.3/node_modules/@types/htmlparser2/README.md +15 -0
  16. package/.cache/typescript/5.3/node_modules/@types/htmlparser2/index.d.ts +120 -0
  17. package/.cache/typescript/5.3/node_modules/@types/htmlparser2/package.json +45 -0
  18. package/.cache/typescript/5.3/node_modules/@types/psl/LICENSE +21 -0
  19. package/.cache/typescript/5.3/node_modules/@types/psl/README.md +52 -0
  20. package/.cache/typescript/5.3/node_modules/@types/psl/index.d.ts +33 -0
  21. package/.cache/typescript/5.3/node_modules/@types/psl/package.json +25 -0
  22. package/.cache/typescript/5.3/node_modules/domelementtype/LICENSE +11 -0
  23. package/.cache/typescript/5.3/node_modules/domelementtype/index.js +15 -0
  24. package/.cache/typescript/5.3/node_modules/domelementtype/package.json +16 -0
  25. package/.cache/typescript/5.3/node_modules/domelementtype/readme.md +1 -0
  26. package/.cache/typescript/5.3/node_modules/domhandler/.travis.yml +6 -0
  27. package/.cache/typescript/5.3/node_modules/domhandler/LICENSE +11 -0
  28. package/.cache/typescript/5.3/node_modules/domhandler/index.js +217 -0
  29. package/.cache/typescript/5.3/node_modules/domhandler/lib/element.js +20 -0
  30. package/.cache/typescript/5.3/node_modules/domhandler/lib/node.js +44 -0
  31. package/.cache/typescript/5.3/node_modules/domhandler/package.json +41 -0
  32. package/.cache/typescript/5.3/node_modules/domhandler/readme.md +116 -0
  33. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/01-basic.json +57 -0
  34. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/02-single_tag_1.json +21 -0
  35. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/03-single_tag_2.json +21 -0
  36. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/04-unescaped_in_script.json +27 -0
  37. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/05-tags_in_comment.json +18 -0
  38. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/06-comment_in_script.json +18 -0
  39. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/07-unescaped_in_style.json +20 -0
  40. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json +20 -0
  41. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/09-unquoted_attrib.json +20 -0
  42. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/10-singular_attribute.json +15 -0
  43. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/11-text_outside_tags.json +40 -0
  44. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/12-text_only.json +11 -0
  45. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/13-comment_in_text.json +19 -0
  46. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/14-comment_in_text_in_script.json +18 -0
  47. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/15-non-verbose.json +22 -0
  48. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/16-normalize_whitespace.json +47 -0
  49. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/17-xml_namespace.json +18 -0
  50. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/18-enforce_empty_tags.json +16 -0
  51. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/19-ignore_empty_tags.json +20 -0
  52. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/20-template_script_tags.json +20 -0
  53. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/21-conditional_comments.json +15 -0
  54. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/22-lowercase_tags.json +41 -0
  55. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/23-dom-lvl1.json +131 -0
  56. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/24-with-start-indices.json +85 -0
  57. package/.cache/typescript/5.3/node_modules/domhandler/test/cases/25-with-end-indices.json +86 -0
  58. package/.cache/typescript/5.3/node_modules/domhandler/test/tests.js +60 -0
  59. package/.cache/typescript/5.3/package-lock.json +57 -0
  60. package/.cache/typescript/5.3/package.json +1 -1
  61. package/README.md +103 -18
  62. package/index.js +1 -1
  63. package/package.json +4 -3
  64. package/test.js +0 -35
@@ -18,6 +18,39 @@
18
18
  "@types/node": "*"
19
19
  }
20
20
  },
21
+ "node_modules/@types/cookie": {
22
+ "version": "0.6.0",
23
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
24
+ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
25
+ "dev": true
26
+ },
27
+ "node_modules/@types/domhandler": {
28
+ "version": "2.4.5",
29
+ "resolved": "https://registry.npmjs.org/@types/domhandler/-/domhandler-2.4.5.tgz",
30
+ "integrity": "sha512-lANhC2grmFG1gBac/8sDAKdIXx+TzAdkJIAjEOSMA+qW3297ybACEbacJnG15aNYfrzDO6fdcoouokqAKsy6aQ==",
31
+ "dev": true
32
+ },
33
+ "node_modules/@types/domutils": {
34
+ "version": "1.7.8",
35
+ "resolved": "https://registry.npmjs.org/@types/domutils/-/domutils-1.7.8.tgz",
36
+ "integrity": "sha512-iZGboDV79ibrO3D625p9yD+VgmMDnyJocdIRJvu9Xz66R8SHfOY/XNgdjY5SFoFiLgILceVfSLt7IUhlk1Vhhg==",
37
+ "dev": true,
38
+ "dependencies": {
39
+ "@types/domhandler": "^2.4.0"
40
+ }
41
+ },
42
+ "node_modules/@types/htmlparser2": {
43
+ "version": "3.10.7",
44
+ "resolved": "https://registry.npmjs.org/@types/htmlparser2/-/htmlparser2-3.10.7.tgz",
45
+ "integrity": "sha512-ycBs4PNr9rY9XFFp4WkP+M1UcO49ahn0+9b24cmIY6KWy0w35rW0G8+JTTe9Rp6Wnyqn5SEHZrhCBMa0TIOxBw==",
46
+ "dev": true,
47
+ "dependencies": {
48
+ "@types/domhandler": "^2.4.3",
49
+ "@types/domutils": "*",
50
+ "@types/node": "*",
51
+ "domhandler": "^2.4.0"
52
+ }
53
+ },
21
54
  "node_modules/@types/jsdom": {
22
55
  "version": "21.1.6",
23
56
  "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.6.tgz",
@@ -48,6 +81,12 @@
48
81
  "form-data": "^4.0.0"
49
82
  }
50
83
  },
84
+ "node_modules/@types/psl": {
85
+ "version": "1.1.3",
86
+ "resolved": "https://registry.npmjs.org/@types/psl/-/psl-1.1.3.tgz",
87
+ "integrity": "sha512-Iu174JHfLd7i/XkXY6VDrqSlPvTDQOtQI7wNAXKKOAADJ9TduRLkNdMgjGiMxSttUIZnomv81JAbAbC0DhggxA==",
88
+ "dev": true
89
+ },
51
90
  "node_modules/@types/request": {
52
91
  "version": "2.48.12",
53
92
  "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz",
@@ -107,6 +146,21 @@
107
146
  "node": ">=0.4.0"
108
147
  }
109
148
  },
149
+ "node_modules/domelementtype": {
150
+ "version": "1.3.1",
151
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
152
+ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
153
+ "dev": true
154
+ },
155
+ "node_modules/domhandler": {
156
+ "version": "2.4.2",
157
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
158
+ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
159
+ "dev": true,
160
+ "dependencies": {
161
+ "domelementtype": "1"
162
+ }
163
+ },
110
164
  "node_modules/entities": {
111
165
  "version": "4.5.0",
112
166
  "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,15 @@
1
+ # Installation
2
+ > `npm install --save @types/cookie`
3
+
4
+ # Summary
5
+ This package contains type definitions for cookie (https://github.com/jshttp/cookie).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie.
9
+
10
+ ### Additional Details
11
+ * Last updated: Sun, 26 Nov 2023 22:07:01 GMT
12
+ * Dependencies: none
13
+
14
+ # Credits
15
+ These definitions were written by [Pine Mizune](https://github.com/pine), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Basic HTTP cookie parser and serializer for HTTP servers.
3
+ */
4
+
5
+ /**
6
+ * Additional serialization options
7
+ */
8
+ export interface CookieSerializeOptions {
9
+ /**
10
+ * Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute}. By default, no
11
+ * domain is set, and most clients will consider the cookie to apply to only
12
+ * the current domain.
13
+ */
14
+ domain?: string | undefined;
15
+
16
+ /**
17
+ * Specifies a function that will be used to encode a cookie's value. Since
18
+ * value of a cookie has a limited character set (and must be a simple
19
+ * string), this function can be used to encode a value into a string suited
20
+ * for a cookie's value.
21
+ *
22
+ * The default function is the global `encodeURIComponent`, which will
23
+ * encode a JavaScript string into UTF-8 byte sequences and then URL-encode
24
+ * any that fall outside of the cookie range.
25
+ */
26
+ encode?(value: string): string;
27
+
28
+ /**
29
+ * Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute}. By default,
30
+ * no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete
31
+ * it on a condition like exiting a web browser application.
32
+ *
33
+ * *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
34
+ * states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
35
+ * possible not all clients by obey this, so if both are set, they should
36
+ * point to the same date and time.
37
+ */
38
+ expires?: Date | undefined;
39
+ /**
40
+ * Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute}.
41
+ * When truthy, the `HttpOnly` attribute is set, otherwise it is not. By
42
+ * default, the `HttpOnly` attribute is not set.
43
+ *
44
+ * *Note* be careful when setting this to true, as compliant clients will
45
+ * not allow client-side JavaScript to see the cookie in `document.cookie`.
46
+ */
47
+ httpOnly?: boolean | undefined;
48
+ /**
49
+ * Specifies the number (in seconds) to be the value for the `Max-Age`
50
+ * `Set-Cookie` attribute. The given number will be converted to an integer
51
+ * by rounding down. By default, no maximum age is set.
52
+ *
53
+ * *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
54
+ * states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
55
+ * possible not all clients by obey this, so if both are set, they should
56
+ * point to the same date and time.
57
+ */
58
+ maxAge?: number | undefined;
59
+ /**
60
+ * Specifies the `boolean` value for the [`Partitioned` `Set-Cookie`](rfc-cutler-httpbis-partitioned-cookies)
61
+ * attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
62
+ * `Partitioned` attribute is not set.
63
+ *
64
+ * **note** This is an attribute that has not yet been fully standardized, and may change in the future.
65
+ * This also means many clients may ignore this attribute until they understand it.
66
+ *
67
+ * More information about can be found in [the proposal](https://github.com/privacycg/CHIPS)
68
+ */
69
+ partitioned?: boolean | undefined;
70
+ /**
71
+ * Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
72
+ * By default, the path is considered the "default path".
73
+ */
74
+ path?: string | undefined;
75
+ /**
76
+ * Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
77
+ *
78
+ * - `'low'` will set the `Priority` attribute to `Low`.
79
+ * - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
80
+ * - `'high'` will set the `Priority` attribute to `High`.
81
+ *
82
+ * More information about the different priority levels can be found in
83
+ * [the specification][rfc-west-cookie-priority-00-4.1].
84
+ *
85
+ * **note** This is an attribute that has not yet been fully standardized, and may change in the future.
86
+ * This also means many clients may ignore this attribute until they understand it.
87
+ */
88
+ priority?: "low" | "medium" | "high" | undefined;
89
+ /**
90
+ * Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute}.
91
+ *
92
+ * - `true` will set the `SameSite` attribute to `Strict` for strict same
93
+ * site enforcement.
94
+ * - `false` will not set the `SameSite` attribute.
95
+ * - `'lax'` will set the `SameSite` attribute to Lax for lax same site
96
+ * enforcement.
97
+ * - `'strict'` will set the `SameSite` attribute to Strict for strict same
98
+ * site enforcement.
99
+ * - `'none'` will set the SameSite attribute to None for an explicit
100
+ * cross-site cookie.
101
+ *
102
+ * More information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification}.
103
+ *
104
+ * *note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.
105
+ */
106
+ sameSite?: true | false | "lax" | "strict" | "none" | undefined;
107
+ /**
108
+ * Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.5|`Secure` `Set-Cookie` attribute}. When truthy, the
109
+ * `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
110
+ *
111
+ * *Note* be careful when setting this to `true`, as compliant clients will
112
+ * not send the cookie back to the server in the future if the browser does
113
+ * not have an HTTPS connection.
114
+ */
115
+ secure?: boolean | undefined;
116
+ }
117
+
118
+ /**
119
+ * Additional parsing options
120
+ */
121
+ export interface CookieParseOptions {
122
+ /**
123
+ * Specifies a function that will be used to decode a cookie's value. Since
124
+ * the value of a cookie has a limited character set (and must be a simple
125
+ * string), this function can be used to decode a previously-encoded cookie
126
+ * value into a JavaScript string or other object.
127
+ *
128
+ * The default function is the global `decodeURIComponent`, which will decode
129
+ * any URL-encoded sequences into their byte representations.
130
+ *
131
+ * *Note* if an error is thrown from this function, the original, non-decoded
132
+ * cookie value will be returned as the cookie's value.
133
+ */
134
+ decode?(value: string): string;
135
+ }
136
+
137
+ /**
138
+ * Parse an HTTP Cookie header string and returning an object of all cookie
139
+ * name-value pairs.
140
+ *
141
+ * @param str the string representing a `Cookie` header value
142
+ * @param [options] object containing parsing options
143
+ */
144
+ export function parse(str: string, options?: CookieParseOptions): Record<string, string>;
145
+
146
+ /**
147
+ * Serialize a cookie name-value pair into a `Set-Cookie` header string.
148
+ *
149
+ * @param name the name for the cookie
150
+ * @param value value to set the cookie to
151
+ * @param [options] object containing serialization options
152
+ * @throws {TypeError} when `maxAge` options is invalid
153
+ */
154
+ export function serialize(name: string, value: string, options?: CookieSerializeOptions): string;
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@types/cookie",
3
+ "version": "0.6.0",
4
+ "description": "TypeScript definitions for cookie",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Pine Mizune",
10
+ "githubUsername": "pine",
11
+ "url": "https://github.com/pine"
12
+ },
13
+ {
14
+ "name": "Piotr Błażejewicz",
15
+ "githubUsername": "peterblazejewicz",
16
+ "url": "https://github.com/peterblazejewicz"
17
+ }
18
+ ],
19
+ "main": "",
20
+ "types": "index.d.ts",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
24
+ "directory": "types/cookie"
25
+ },
26
+ "scripts": {},
27
+ "dependencies": {},
28
+ "typesPublisherContentHash": "0fbdf9c886fb40c8dc7677b8b7d0f9e02ac5235e163d90244a4fb9004736a575",
29
+ "typeScriptVersion": "4.5"
30
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,92 @@
1
+ # Installation
2
+ > `npm install --save @types/domhandler`
3
+
4
+ # Summary
5
+ This package contains type definitions for domhandler (https://github.com/fb55/DomHandler#readme).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler/index.d.ts)
10
+ ````ts
11
+ export interface DomHandlerOptions {
12
+ /***
13
+ * Indicates whether the whitespace in text nodes should be normalized
14
+ * (= all whitespace should be replaced with single spaces). The default value is "false".
15
+ */
16
+ normalizeWhitespace?: boolean | undefined;
17
+
18
+ /***
19
+ * Adds DOM level 1 properties to all elements.
20
+ */
21
+ withDomLvl1?: boolean | undefined;
22
+
23
+ /***
24
+ * Indicates whether a startIndex property will be added to nodes.
25
+ * When the parser is used in a non-streaming fashion, startIndex is an integer
26
+ * indicating the position of the start of the node in the document.
27
+ * The default value is "false".
28
+ */
29
+ withStartIndices?: boolean | undefined;
30
+
31
+ /***
32
+ * Indicates whether a endIndex property will be added to nodes.
33
+ * When the parser is used in a non-streaming fashion, endIndex is an integer
34
+ * indicating the position of the end of the node in the document.
35
+ * The default value is "false".
36
+ */
37
+ withEndIndices?: boolean | undefined;
38
+ }
39
+
40
+ export interface DomElement {
41
+ attribs?: { [s: string]: string } | undefined;
42
+ children?: DomElement[] | undefined;
43
+ data?: any;
44
+ name?: string | undefined;
45
+ next?: DomElement | undefined;
46
+ parent?: DomElement | undefined;
47
+ prev?: DomElement | undefined;
48
+ type?: string | undefined;
49
+ }
50
+
51
+ export interface Element extends DomElement {
52
+ name: string;
53
+ }
54
+
55
+ export interface Node extends DomElement {
56
+ readonly firstChild: DomElement;
57
+ readonly lastChild: DomElement;
58
+ readonly nodeType: number;
59
+ }
60
+
61
+ export class DomHandler {
62
+ constructor(callback: (error: any, dom: DomElement[]) => any, options?: DomHandlerOptions);
63
+
64
+ onparserinit(parser: any): void;
65
+
66
+ /***
67
+ * Resets the handler back to starting state
68
+ */
69
+ onreset(): void;
70
+
71
+ /***
72
+ * Signals the handler that parsing is done
73
+ */
74
+ onend(): void;
75
+ onerror(error: Error): void;
76
+ onclosetag(): void;
77
+ onopentag(name: string, attribs: { [s: string]: string }): void;
78
+ ontext(data: string): void;
79
+ oncomment(data: string): void;
80
+ oncdatastart(): void;
81
+ oncommentend(): void;
82
+ onprocessinginstruction(name: string, data: string): void;
83
+ }
84
+
85
+ ````
86
+
87
+ ### Additional Details
88
+ * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
89
+ * Dependencies: none
90
+
91
+ # Credits
92
+ These definitions were written by [Johan Davidsson](https://github.com/johandavidson).
@@ -0,0 +1,73 @@
1
+ export interface DomHandlerOptions {
2
+ /***
3
+ * Indicates whether the whitespace in text nodes should be normalized
4
+ * (= all whitespace should be replaced with single spaces). The default value is "false".
5
+ */
6
+ normalizeWhitespace?: boolean | undefined;
7
+
8
+ /***
9
+ * Adds DOM level 1 properties to all elements.
10
+ */
11
+ withDomLvl1?: boolean | undefined;
12
+
13
+ /***
14
+ * Indicates whether a startIndex property will be added to nodes.
15
+ * When the parser is used in a non-streaming fashion, startIndex is an integer
16
+ * indicating the position of the start of the node in the document.
17
+ * The default value is "false".
18
+ */
19
+ withStartIndices?: boolean | undefined;
20
+
21
+ /***
22
+ * Indicates whether a endIndex property will be added to nodes.
23
+ * When the parser is used in a non-streaming fashion, endIndex is an integer
24
+ * indicating the position of the end of the node in the document.
25
+ * The default value is "false".
26
+ */
27
+ withEndIndices?: boolean | undefined;
28
+ }
29
+
30
+ export interface DomElement {
31
+ attribs?: { [s: string]: string } | undefined;
32
+ children?: DomElement[] | undefined;
33
+ data?: any;
34
+ name?: string | undefined;
35
+ next?: DomElement | undefined;
36
+ parent?: DomElement | undefined;
37
+ prev?: DomElement | undefined;
38
+ type?: string | undefined;
39
+ }
40
+
41
+ export interface Element extends DomElement {
42
+ name: string;
43
+ }
44
+
45
+ export interface Node extends DomElement {
46
+ readonly firstChild: DomElement;
47
+ readonly lastChild: DomElement;
48
+ readonly nodeType: number;
49
+ }
50
+
51
+ export class DomHandler {
52
+ constructor(callback: (error: any, dom: DomElement[]) => any, options?: DomHandlerOptions);
53
+
54
+ onparserinit(parser: any): void;
55
+
56
+ /***
57
+ * Resets the handler back to starting state
58
+ */
59
+ onreset(): void;
60
+
61
+ /***
62
+ * Signals the handler that parsing is done
63
+ */
64
+ onend(): void;
65
+ onerror(error: Error): void;
66
+ onclosetag(): void;
67
+ onopentag(name: string, attribs: { [s: string]: string }): void;
68
+ ontext(data: string): void;
69
+ oncomment(data: string): void;
70
+ oncdatastart(): void;
71
+ oncommentend(): void;
72
+ onprocessinginstruction(name: string, data: string): void;
73
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@types/domhandler",
3
+ "version": "2.4.5",
4
+ "description": "TypeScript definitions for domhandler",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Johan Davidsson",
10
+ "githubUsername": "johandavidson",
11
+ "url": "https://github.com/johandavidson"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/domhandler"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {},
23
+ "typesPublisherContentHash": "60a0dea4ceaa8d3a2845f5b3a5f65cca135472055a4143248af267f9fd234f68",
24
+ "typeScriptVersion": "4.5"
25
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,15 @@
1
+ # Installation
2
+ > `npm install --save @types/domutils`
3
+
4
+ # Summary
5
+ This package contains type definitions for domutils (https://github.com/FB55/domutils#readme).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domutils.
9
+
10
+ ### Additional Details
11
+ * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
12
+ * Dependencies: [@types/domhandler](https://npmjs.com/package/@types/domhandler)
13
+
14
+ # Credits
15
+ These definitions were written by [Johan Davidsson](https://github.com/johandavidson).
@@ -0,0 +1,124 @@
1
+ import { DomElement } from "domhandler";
2
+ /***
3
+ * Append an element after another
4
+ *
5
+ * @argument elem The element to append to
6
+ * @argument next The element be added
7
+ */
8
+ export function append(elem: DomElement, next: DomElement): void;
9
+ /***
10
+ * Append a child to an element
11
+ *
12
+ * @argument elem The element to append to
13
+ * @argument child The element to be added as a child
14
+ */
15
+ export function appendChild(elem: DomElement, child: DomElement): void;
16
+ /***
17
+ * Compare the position of one node against another node in any other document.
18
+ * The return value is a bitmask with the following values:
19
+ *
20
+ * document order:
21
+ * > There is an ordering, document order, defined on all the nodes in the
22
+ * > document corresponding to the order in which the first character of the
23
+ * > XML representation of each node occurs in the XML representation of the
24
+ * > document after expansion of general entities. Thus, the document element
25
+ * > node will be the first node. Element nodes occur before their children.
26
+ * > Thus, document order orders element nodes in order of the occurrence of
27
+ * > their start-tag in the XML (after expansion of entities). The attribute
28
+ * > nodes of an element occur after the element and before its children. The
29
+ * > relative order of attribute nodes is implementation-dependent./
30
+ *
31
+ * Source:
32
+ * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
33
+ * @argument nodaA The first node to use in the comparison
34
+ * @argument nodeB The second node to use in the comparison
35
+ *
36
+ * @return A bitmask describing the input nodes' relative position.
37
+ *
38
+ * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
39
+ * a description of these values.
40
+ */
41
+ export function compareDocumentPosition(nodeA: DomElement, nodeB: DomElement): number;
42
+ export function existsOne(test: any, elems: DomElement[]): boolean;
43
+ export function filter(test: any, element: DomElement, recurse: boolean, limit: number): DomElement[];
44
+ export function find(test: any, elems: DomElement[], recurse: boolean, limit: number): DomElement[];
45
+ export function findAll(test: any, rootElems: DomElement[]): DomElement[];
46
+ export function findOne(test: any, elems: DomElement[]): DomElement;
47
+ export function findOneChild(test: any, elems: DomElement[]): DomElement;
48
+ export function getAttributeValue(elem: DomElement, name: string): string;
49
+ export function getChildren(elem: DomElement): DomElement[];
50
+ /***
51
+ * Legacy
52
+ */
53
+ export function getElementById(id: any, element: any, recurse?: any): any;
54
+ /***
55
+ * Legacy
56
+ */
57
+ export function getElements(options: any, element: any, recurse?: any, limit?: any): any;
58
+ /***
59
+ * Legacy
60
+ */
61
+ export function getElementsByTagName(name: any, element: any, recurse?: any, limit?: any): any;
62
+ /***
63
+ * Legacy
64
+ */
65
+ export function getElementsByTagType(type: any, element: any, recurse?: any, limit?: any): any;
66
+ export function getInnerHTML(elem: DomElement, opts: any): string;
67
+ /***
68
+ * Returns the name property of an element
69
+ *
70
+ * @argument elem The element to get the name for
71
+ */
72
+ export function getName(elem: DomElement): string;
73
+ /***
74
+ * Returns a string representing the array of DomElements
75
+ *
76
+ * @argument dom An array of DomElement that should be stringified
77
+ * @argument [opts] Optional options object
78
+ */
79
+ export function getOuterHTML(
80
+ dom: DomElement[],
81
+ opts?: { decodeEntities?: boolean | undefined; xmlMode?: boolean | undefined },
82
+ ): string;
83
+ export function getParent(elem: DomElement): DomElement;
84
+ export function getSiblings(elem: DomElement): DomElement[];
85
+ export function getText(elem: DomElement): string;
86
+ export function hasAttrib(elem: DomElement, name: string): boolean;
87
+ export function isTag(elem: DomElement): boolean;
88
+ /***
89
+ * Prepend an element before another
90
+ *
91
+ * @argument elem The element to append to
92
+ * @argument prev The element be added
93
+ */
94
+ export function prepend(elem: DomElement, prev: DomElement): void;
95
+ /***
96
+ * Remove an element from the dom
97
+ *
98
+ * @argument elem The element to be removed
99
+ */
100
+ export function removeElement(elem: DomElement): void;
101
+ /***
102
+ * Given an array of nodes, remove any member that is contained by another.
103
+ */
104
+ export function removeSubsets(nodes: DomElement[]): DomElement[];
105
+ /***
106
+ * Replace an element in the dom
107
+ *
108
+ * @argument elem The element to be replaced
109
+ * @argument replacement The element to be added
110
+ */
111
+ export function replaceElement(elem: DomElement, replacement: DomElement): void;
112
+ /***
113
+ * Legacy
114
+ */
115
+ export function testElement(options: any, element: any): any;
116
+ /***
117
+ * Sort an array of nodes based on their relative position in the document and
118
+ * remove any duplicate nodes. If the array contains nodes that do not belong
119
+ * to the same document, sort order is unspecified.
120
+ *
121
+ * @argument nodes Array of DOM nodes
122
+ * @returns collection of unique nodes, sorted in document order
123
+ */
124
+ export function uniqueSort(nodes: DomElement[]): DomElement[];