summaryrefslogtreecommitdiff
path: root/school/node_modules/pronote-api/src/data/html.js
blob: 33a4f0d23a596a294f4e2de58738ab5a571135bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const { stripHtml } = require('string-strip-html');

function fromHTML(text)
{
    if (!text) {
        if (text === undefined) {
            return null;
        }

        return text;
    }

    return stripHtml(text).result;
}

module.exports = fromHTML;