src/treenode.js
function cloneItree(itree, excludeKeys) {
    const clone = {};
    excludeKeys = _.castArray(excludeKeys);
    excludeKeys.push('ref');

    _.each(itree, (v, k) => {
        if (!_.includes(excludeKeys, k)) {
            clone[k] = _.cloneDeep(v);
        }
    });

    return clone;
}
function cloneItree(itree, excludeKeys) {
    const clone = {};
    excludeKeys = _.castArray(excludeKeys);
    excludeKeys.push('ref');

    _.each(itree, (v, k) => {
        if (!_.includes(excludeKeys, k)) {
            clone[k] = _.cloneDeep(v);
        }
    });

    return clone;
}
function cloneItree ( itree , excludeKeys ) { const clone = { } ; excludeKeys = _ . castArray ( excludeKeys ) ; excludeKeys . push ( 'ref' ) ; _ . each ( itree , ( v , k ) => { if ( ! _ . includes ( excludeKeys , k ) ) { clone [ k ] = _ . cloneDeep ( v ) ; } } ) ; return clone ; }
Helper method to clone an ITree config object.

Rejects non-clonable properties like ref.

@private
@param {object} itree ITree configuration object
@param {array} excludeKeys Keys to exclude, if any
@return {object} Cloned ITree.
Helper method to clone an ITree config object .