index.js
function(config) {
        for(var i=0; i<config.length; i++) {
            if(config[i].dimensions) {
                var dimensions = config[i].dimensions;
                this.dimensions = dimensions;
                var allDimensions = {};
                for(var j=0; j<dimensions.length; j++) {
                    var name;
                    for(name in dimensions[j]) {
                        allDimensions[name] = j;
                        break;
                    }
                }
                return [dimensions, allDimensions];
            }
        }
        return [[], {}];
    }
function(config) {
        for(var i=0; i<config.length; i++) {
            if(config[i].dimensions) {
                var dimensions = config[i].dimensions;
                this.dimensions = dimensions;
                var allDimensions = {};
                for(var j=0; j<dimensions.length; j++) {
                    var name;
                    for(name in dimensions[j]) {
                        allDimensions[name] = j;
                        break;
                    }
                }
                return [dimensions, allDimensions];
            }
        }
        return [[], {}];
    }
function ( config ) { for ( var i = 0 ; i < config . length ; i ++ ) { if ( config [ i ] . dimensions ) { var dimensions = config [ i ] . dimensions ; this . dimensions = dimensions ; var allDimensions = { } ; for ( var j = 0 ; j < dimensions . length ; j ++ ) { var name ; for ( name in dimensions [ j ] ) { allDimensions [ name ] = j ; break ; } } return [ dimensions , allDimensions ] ; } } return [ [ ] , { } ] ; }
Extract dimensions object and dimension -> number map
@param config {object}
@returns {array}
@private
Extract dimensions object and dimension - > number map