@types/sanitize-html 1.6.27 → 1.13.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
> `npm install --save @types/sanitize-html`
|
|
3
3
|
|
|
4
4
|
# Summary
|
|
5
|
-
This package contains type definitions for sanitize-html 1.
|
|
5
|
+
This package contains type definitions for sanitize-html 1.13.0 (https://github.com/punkave/sanitize-html).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
8
|
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/sanitize-html
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 19 Sep 2016 17:28:59 GMT
|
|
12
12
|
* File structure: ProperModule
|
|
13
13
|
* Library Dependencies: none
|
|
14
14
|
* Module Dependencies: none
|
|
15
|
-
* Global values:
|
|
15
|
+
* Global values: sanitize
|
|
16
16
|
|
|
17
17
|
# Credits
|
|
18
|
-
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>.
|
|
18
|
+
These definitions were written by Rogier Schouten <https://github.com/rogierschouten>, Afshin Darian <https://github.com/afshin>.
|
sanitize-html/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Type definitions for sanitize-html 1.13.0
|
|
2
|
+
// Project: https://github.com/punkave/sanitize-html
|
|
3
|
+
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>, Afshin Darian <https://github.com/afshin>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
|
|
6
|
+
export = sanitize;
|
|
7
|
+
|
|
8
|
+
declare function sanitize(dirty: string, options?: sanitize.IOptions): string;
|
|
9
|
+
|
|
10
|
+
declare namespace sanitize {
|
|
11
|
+
type Attributes = { [attr: string]: string };
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
type Tag = { tagName: string; attribs: Attributes; text?: string; };
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
type Transformer = (tagName: string, attribs: Attributes) => Tag;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
interface IDefaults {
|
|
21
|
+
allowedAttributes: { [index: string]: string[] };
|
|
22
|
+
allowedSchemes: string[];
|
|
23
|
+
allowedSchemesByTag: { [index: string]: string[] };
|
|
24
|
+
allowedTags: string[];
|
|
25
|
+
selfClosing: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
interface IFrame {
|
|
30
|
+
tag: string;
|
|
31
|
+
attribs: { [index: string]: string };
|
|
32
|
+
text: string;
|
|
33
|
+
tagPosition: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
interface IOptions {
|
|
38
|
+
allowedAttributes?: { [index: string]: string[] } | boolean;
|
|
39
|
+
allowedClasses?: { [index: string]: string[] } | boolean;
|
|
40
|
+
allowedSchemes?: string[] | boolean;
|
|
41
|
+
allowedTags?: string[] | boolean;
|
|
42
|
+
exclusiveFilter?: (frame: IFrame) => boolean;
|
|
43
|
+
nonTextTags?: string[];
|
|
44
|
+
selfClosing?: string[];
|
|
45
|
+
transformTags?: { [tagName: string]: string | Transformer };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
var defaults: IDefaults;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
function simpleTransform(tagName: string, attribs: Attributes, merge?: boolean): Transformer;
|
|
53
|
+
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/sanitize-html",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "TypeScript definitions for sanitize-html 1.
|
|
3
|
+
"version": "1.13.31",
|
|
4
|
+
"description": "TypeScript definitions for sanitize-html 1.13.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Rogier Schouten <https://github.com/rogierschouten>, Afshin Darian <https://github.com/afshin>",
|
|
5
7
|
"main": "",
|
|
6
|
-
"scripts": {},
|
|
7
|
-
"author": "Rogier Schouten <https://github.com/rogierschouten>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"scripts": {},
|
|
13
|
+
"dependencies": {},
|
|
13
14
|
"typings": "index.d.ts",
|
|
14
|
-
"
|
|
15
|
+
"typesPublisherContentHash": "835459fc02d0882a0a8f60d07d512b8e8b0257af86caeebf79081a0eb1ac4c29"
|
|
15
16
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"authors": "Rogier Schouten <https://github.com/rogierschouten>",
|
|
2
|
+
"authors": "Rogier Schouten <https://github.com/rogierschouten>, Afshin Darian <https://github.com/afshin>",
|
|
3
3
|
"definitionFilename": "index.d.ts",
|
|
4
4
|
"libraryDependencies": [],
|
|
5
5
|
"moduleDependencies": [],
|
|
6
6
|
"libraryMajorVersion": "1",
|
|
7
|
-
"libraryMinorVersion": "
|
|
8
|
-
"libraryName": "sanitize-html 1.
|
|
7
|
+
"libraryMinorVersion": "13",
|
|
8
|
+
"libraryName": "sanitize-html 1.13.0",
|
|
9
9
|
"typingsPackageName": "sanitize-html",
|
|
10
10
|
"projectName": "https://github.com/punkave/sanitize-html",
|
|
11
11
|
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
|
|
12
12
|
"sourceBranch": "types-2.0",
|
|
13
13
|
"kind": "ProperModule",
|
|
14
14
|
"globals": [
|
|
15
|
-
"
|
|
15
|
+
"sanitize"
|
|
16
16
|
],
|
|
17
17
|
"declaredModules": [
|
|
18
18
|
"sanitize-html"
|
|
@@ -20,5 +20,6 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"index.d.ts"
|
|
22
22
|
],
|
|
23
|
-
"
|
|
23
|
+
"hasPackageJson": false,
|
|
24
|
+
"contentHash": "835459fc02d0882a0a8f60d07d512b8e8b0257af86caeebf79081a0eb1ac4c29"
|
|
24
25
|
}
|
package/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Type definitions for sanitize-html 1.6.0
|
|
2
|
-
// Project: https://github.com/punkave/sanitize-html
|
|
3
|
-
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
|
4
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare function sanitizeHtml(s: string, opts?: {
|
|
10
|
-
allowedTags?: string[];
|
|
11
|
-
allowedSchemes?: string[];
|
|
12
|
-
allowedAttributes?: { [index: string]: string[] };
|
|
13
|
-
allowedClasses?: { [index: string]: string[] };
|
|
14
|
-
transformTags?: { [index: string]: any };
|
|
15
|
-
exclusiveFilter?: {
|
|
16
|
-
[index: string]: (frame: {
|
|
17
|
-
tag: string;
|
|
18
|
-
attribs: { [index: string]: string };
|
|
19
|
-
text: string;
|
|
20
|
-
tagPosition: number;
|
|
21
|
-
}) => boolean
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
}): string;
|
|
25
|
-
|
|
26
|
-
export = sanitizeHtml;
|