src/packer.js
function unpackNode(item) {
    if (!Array.isArray(item)) {
        return { type: "#", text: item };
    }
    let node = {
        type: item[0],
        props: item[1] || {},
        children: []
    };
    for (let i = 2; i < item.length; i++) {
        node.children.push(unpackNode(item[i]));
    }
    return node;
}
function unpackNode(item) {
    if (!Array.isArray(item)) {
        return { type: "#", text: item };
    }
    let node = {
        type: item[0],
        props: item[1] || {},
        children: []
    };
    for (let i = 2; i < item.length; i++) {
        node.children.push(unpackNode(item[i]));
    }
    return node;
}
(array | string) => array