define([
], function () {
    /**
     * Removes an elements child node and optionally the node itself.
     *
     * @exports remove-element
     *
     * @param {Object} node HTML node to act upon
     * @param {Boolean} self Optional: Remove the entire node
     *
     * return {Object} Original HTML node
     */
    function removeElement (node, self) {
        var parent = node.parentNode;
        while (node.hasChildNodes()) {
            node.removeChild(node.lastChild);
        }
        if (self && parent) {
            parent.removeChild(node);
        }
        return parent;
    }

    return removeElement;
});

@@ -299,24 +299,490 @@
 l HTML node%0A
+     *%0A     * @example%0A     * %60%60%60html%0A     * %3Cbody%3E%0A     * %3Cdiv class=%22my-parent%22%3E%0A     * %09%09%3Cdiv%3E%0A     * %09%09%09%3Cspan%3E%3C/span%3E%0A     * %09 %09%3C/div%3E%0A     * %09%09%3Cimg /%3E%0A     *  %3C/div%3E%0A     * %3C/body%3E%0A     * %60%60%60%0A     * %60%60%60js%0A     * removeElement(myParent);%0A     * // Returns %3Cbody%3E (containing %3Cdiv class=%22my-parent%22%3E%3C/div%3E)%0A     * %60%60%60%0A     * %60%60%60js%0A     * removeElement(myParent, true)%0A     * // Returns %3Cbody%3E%3C/body (no longer containing %3Cdiv class=%22my-parent%22%3E%3C/div%3E)%0A     * %60%60%60%0A
      */%0A    

Add example for remove-element