ts: lib/string.js

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-06-12 06:53:37 +08:00
parent 952a1663cc
commit 238bf1cc78
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +0,0 @@
'use strict'
function stripTags (s) {
return s.replace(RegExp('</?[^<>]*>', 'gi'), '')
}
exports.stripTags = stripTags

3
lib/string.ts Normal file
View File

@ -0,0 +1,3 @@
export function stripTags(s) {
return s.replace(RegExp('</?[^<>]*>', 'gi'), '')
}