packages/optimizely-sdk/lib/core/bucketer/index.js
function(bucketValue, trafficAllocationConfig) {
    for (var i = 0; i < trafficAllocationConfig.length; i++) {
      if (bucketValue < trafficAllocationConfig[i].endOfRange) {
        return trafficAllocationConfig[i].entityId;
      }
    }
    return null;
  }
function(bucketValue, trafficAllocationConfig) {
    for (var i = 0; i < trafficAllocationConfig.length; i++) {
      if (bucketValue < trafficAllocationConfig[i].endOfRange) {
        return trafficAllocationConfig[i].entityId;
      }
    }
    return null;
  }
function ( bucketValue , trafficAllocationConfig ) { for ( var i = 0 ; i < trafficAllocationConfig . length ; i ++ ) { if ( bucketValue < trafficAllocationConfig [ i ] . endOfRange ) { return trafficAllocationConfig [ i ] . entityId ; } } return null ; }
Returns entity ID associated with bucket value
@param  {string}   bucketValue
@param  {Object[]} trafficAllocationConfig
@param  {number}   trafficAllocationConfig[].endOfRange
@param  {number}   trafficAllocationConfig[].entityId
@return {string}   Entity ID for bucketing if bucket value is within traffic allocation boundaries, null otherwise
Returns entity ID associated with bucket value