function warn(message) {
  if (window.console && (typeof console.warn === 'function')) {
    console.warn(message);
  }
}

export default function deprecationWarning(oldname, newname, link) {
  if (process.env.NODE_ENV !== 'production') {
    let message = `${oldname} is deprecated. Use ${newname} instead.`;
    warn(message);

    if (link) {
      warn(`You can read more about it here ${link}`);
    }
  }
}

export default function deprecationWarning(oldname, newname, link) {
  if (process.env.NODE_ENV !== 'production') {
    if (!window.console && (typeof console.warn !== 'function')) {
      return;
    }

    let message = `${oldname} is deprecated. Use ${newname} instead.`;
    console.warn(message);

    if (link) {
      console.warn(`You can read more about it here ${link}`);
    }
  }
}

Refactor check for IE9 console.
Refactor check for IE9 console.

That way the additional IE9 checking code
will be stripped out in production.
