Skip to content

Commit f80b3b8

Browse files
xavdidericnorris
authored andcommitted
add typings
1 parent 94ceaf6 commit f80b3b8

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

index.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export as namespace striptags
2+
3+
export = striptags
4+
5+
/**
6+
* Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
7+
* final chunk will be the remaining elements.
8+
*
9+
* @param html The text to process.
10+
* @param allowedTags Tags which aren't removed
11+
* @param tagReplacement Removed tags are replaced with this
12+
* @return Returns the input string, sans any html tags that weren't allowed
13+
*/
14+
declare function striptags(
15+
html: string,
16+
allowedTags?: string | string[],
17+
tagReplacement?: string
18+
): string
19+
20+
declare namespace striptags {
21+
export const init_streaming_mode: (
22+
allowedTags?: string | string[],
23+
tagReplacement?: string
24+
) => (html: string) => string
25+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"strip",
2323
"tags"
2424
],
25+
"typings": "index.d.ts",
2526
"scripts": {
2627
"test": "mocha",
2728
"coverage": "istanbul cover _mocha -- -R spec"

0 commit comments

Comments
 (0)