lib/utils/detect-features.js
function featureNameFromProperty(instance, defaultName, candidateMap) {
  for (var key in candidateMap) {
    if (typeof instance[key] !== 'undefined') {
      return candidateMap[key];
    }
  }

  console.warn('no feature name detected for '+ defaultName +' using default');
  return defaultName;
}
function featureNameFromProperty(instance, defaultName, candidateMap) {
  for (var key in candidateMap) {
    if (typeof instance[key] !== 'undefined') {
      return candidateMap[key];
    }
  }

  console.warn('no feature name detected for '+ defaultName +' using default');
  return defaultName;
}
function featureNameFromProperty ( instance , defaultName , candidateMap ) { for ( var key in candidateMap ) { if ( typeof instance [ key ] !== 'undefined' ) { return candidateMap [ key ] ; } } console . warn ( 'no feature name detected for ' + defaultName + ' using default' ) ; return defaultName ; }
Detects browser-specific names of browser features by checking availability
of browser-specific properties in given object instance.

@param {Object} instance object that will be checked for existence of properties
@param {String} defaultName name used if nothing else detected (standard-compliant name)
@param {Object} candidateMap browser-specific properties (keys) mapped to feature names (values)
@return {String} value from candidateMap or defaultName
Detects browser - specific names of browser features by checking availability of browser - specific properties in given object instance .