src/ol/source/Source.js
function adaptAttributions(attributionLike) {
  if (!attributionLike) {
    return null;
  }
  if (Array.isArray(attributionLike)) {
    return function(frameState) {
      return attributionLike;
    };
  }

  if (typeof attributionLike === 'function') {
    return attributionLike;
  }

  return function(frameState) {
    return [attributionLike];
  };
}
function adaptAttributions(attributionLike) {
  if (!attributionLike) {
    return null;
  }
  if (Array.isArray(attributionLike)) {
    return function(frameState) {
      return attributionLike;
    };
  }

  if (typeof attributionLike === 'function') {
    return attributionLike;
  }

  return function(frameState) {
    return [attributionLike];
  };
}
function adaptAttributions ( attributionLike ) { if ( ! attributionLike ) { return null ; } if ( Array . isArray ( attributionLike ) ) { return function ( frameState ) { return attributionLike ; } ; } if ( typeof attributionLike === 'function' ) { return attributionLike ; } return function ( frameState ) { return [ attributionLike ] ; } ; }
Turns the attributions option into an attributions function.
@param {AttributionLike|undefined} attributionLike The attribution option.
@return {?Attribution} An attribution function (or null).
Turns the attributions option into an attributions function .