mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-26 09:48:50 +01:00
6 lines
173 B
JavaScript
6 lines
173 B
JavaScript
const div = document.createElement('div');
|
|
export default function htmlContentLength(html) {
|
|
if (!html) return 0;
|
|
div.innerHTML = html;
|
|
return div.innerText.length;
|
|
}
|