lib/util/page-generator.js
function flattenHead(obj) {
    var newHead = [];

    _arrayCopy(newHead, obj["head-start"]);
    _arrayCopy(newHead, obj["head"]);
    _arrayCopy(newHead, obj["head-end"]);

    delete obj["head-start"];
    delete obj["head-end"];
    obj.head = newHead;

    return obj;
}
function flattenHead(obj) {
    var newHead = [];

    _arrayCopy(newHead, obj["head-start"]);
    _arrayCopy(newHead, obj["head"]);
    _arrayCopy(newHead, obj["head-end"]);

    delete obj["head-start"];
    delete obj["head-end"];
    obj.head = newHead;

    return obj;
}
function flattenHead ( obj ) { var newHead = [ ] ; _arrayCopy ( newHead , obj [ "head-start" ] ) ; _arrayCopy ( newHead , obj [ "head" ] ) ; _arrayCopy ( newHead , obj [ "head-end" ] ) ; delete obj [ "head-start" ] ; delete obj [ "head-end" ] ; obj . head = newHead ; return obj ; }
Merges `head-start`, `head`, and `head-end` subnodes of the input object into a one `head` subnode and removes the
other two subnodes.
@param {Object} obj Object to be manipulated
@return {Object} the input param object with its `head` node flattened
Merges head - start head and head - end subnodes of the input object into a one head subnode and removes the other two subnodes .