(htmlStr, options = null)
| 200 | } |
| 201 | |
| 202 | export function htmlToPlainText(htmlStr, options = null) { |
| 203 | let convertOptions = { |
| 204 | ignoreHref: true, |
| 205 | }; |
| 206 | if (options) { |
| 207 | convertOptions = { |
| 208 | ...convertOptions, |
| 209 | ...options, |
| 210 | } |
| 211 | } |
| 212 | return convert(htmlStr || '', convertOptions); |
| 213 | } |
| 214 | |
| 215 | export function truncateString(str, num, ellipsis = true) { |
| 216 | if (str.length > num) { |
no outgoing calls
no test coverage detected