dist/toolkit.js
function(data, depth) {
        depth = depth || 0;

        // If root, store the data
        if (!depth) {
            this.data = data;
        }

        // Store the data indexed by URL
        if (data.url) {
            this.dataMap[data.url] = data;
        }

        if (data.children) {
            for (var i = 0, l = data.children.length; i < l; i++) {
                this.load(data.children[i], depth + 1);
            }
        }
    }
function(data, depth) {
        depth = depth || 0;

        // If root, store the data
        if (!depth) {
            this.data = data;
        }

        // Store the data indexed by URL
        if (data.url) {
            this.dataMap[data.url] = data;
        }

        if (data.children) {
            for (var i = 0, l = data.children.length; i < l; i++) {
                this.load(data.children[i], depth + 1);
            }
        }
    }
function ( data , depth ) { depth = depth || 0 ; // If root, store the data if ( ! depth ) { this . data = data ; } // Store the data indexed by URL if ( data . url ) { this . dataMap [ data . url ] = data ; } if ( data . children ) { for ( var i = 0 , l = data . children . length ; i < l ; i ++ ) { this . load ( data . children [ i ] , depth + 1 ) ; } } }
Load the data into the class and save a mapping of it.

@param {Object} data
@param {Number} [depth]
Load the data into the class and save a mapping of it .