index.js
function(contextObj) {
        if(contextObj === undefined) {
            contextObj = {};
        }
        var context = new Array(this.dimensionsList.length);
        for(var i=0; i<this.dimensionsList.length; i++) {
            var dimension = this.dimensionsList[i];
            if(contextObj.hasOwnProperty(dimension)) {
                var value = contextObj[dimension];
                if(value.constructor === Array) {
                    var newValue = [];
                    for(var j=0; j<value.length; j++) {
                        var numValue = this.valueToNumber[dimension][value[j]];
                        if(numValue !== undefined) {
                            newValue.push(numValue);
                        }
                    }
                    if(newValue.length) {
                        context[i] = newValue;
                        continue;
                    }
                } else {
                    numValue = this.valueToNumber[dimension][value];
                    if(numValue !== undefined) {
                        context[i] = numValue;
                        continue;
                    }
                }
            }
            context[i] = 0;
        }
        return context;
    }
function(contextObj) {
        if(contextObj === undefined) {
            contextObj = {};
        }
        var context = new Array(this.dimensionsList.length);
        for(var i=0; i<this.dimensionsList.length; i++) {
            var dimension = this.dimensionsList[i];
            if(contextObj.hasOwnProperty(dimension)) {
                var value = contextObj[dimension];
                if(value.constructor === Array) {
                    var newValue = [];
                    for(var j=0; j<value.length; j++) {
                        var numValue = this.valueToNumber[dimension][value[j]];
                        if(numValue !== undefined) {
                            newValue.push(numValue);
                        }
                    }
                    if(newValue.length) {
                        context[i] = newValue;
                        continue;
                    }
                } else {
                    numValue = this.valueToNumber[dimension][value];
                    if(numValue !== undefined) {
                        context[i] = numValue;
                        continue;
                    }
                }
            }
            context[i] = 0;
        }
        return context;
    }
function ( contextObj ) { if ( contextObj === undefined ) { contextObj = { } ; } var context = new Array ( this . dimensionsList . length ) ; for ( var i = 0 ; i < this . dimensionsList . length ; i ++ ) { var dimension = this . dimensionsList [ i ] ; if ( contextObj . hasOwnProperty ( dimension ) ) { var value = contextObj [ dimension ] ; if ( value . constructor === Array ) { var newValue = [ ] ; for ( var j = 0 ; j < value . length ; j ++ ) { var numValue = this . valueToNumber [ dimension ] [ value [ j ] ] ; if ( numValue !== undefined ) { newValue . push ( numValue ) ; } } if ( newValue . length ) { context [ i ] = newValue ; continue ; } } else { numValue = this . valueToNumber [ dimension ] [ value ] ; if ( numValue !== undefined ) { context [ i ] = numValue ; continue ; } } } context [ i ] = 0 ; } return context ; }
Converts a context object to equivalent array of numerical values.

@param contextObj {object}
@returns {array}
@private
Converts a context object to equivalent array of numerical values .