PHP 7.4.33
Preview: index.js Size: 697 B
/usr/share/nodejs/parse5/lib/index.js
'use strict';

const Parser = require('./parser');
const Serializer = require('./serializer');

// Shorthands
exports.parse = function parse(html, options) {
    const parser = new Parser(options);

    return parser.parse(html);
};

exports.parseFragment = function parseFragment(fragmentContext, html, options) {
    if (typeof fragmentContext === 'string') {
        options = html;
        html = fragmentContext;
        fragmentContext = null;
    }

    const parser = new Parser(options);

    return parser.parseFragment(html, fragmentContext);
};

exports.serialize = function(node, options) {
    const serializer = new Serializer(node, options);

    return serializer.serialize();
};

Directory Contents

Dirs: 7 × Files: 1
Name Size Perms Modified Actions
common DIR
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
parser DIR
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
tokenizer DIR
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
utils DIR
- drwxr-xr-x 2024-11-19 10:14:58
Edit Download
697 B lrw-r--r-- 2021-12-28 17:17:24
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).