function retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {
    var _ref;
    if (extension === void 0) {
      extension = 'png';
    }
    if (retinaSuffix === void 0) {
      retinaSuffix = '_2x';
    }
    if (!filename) {
      throw new PolishedError(58);
    }
    // Replace the dot at the beginning of the passed extension if one exists
    var ext = extension.replace(/^\./, '');
    var rFilename = retinaFilename ? retinaFilename + "." + ext : "" + filename + retinaSuffix + "." + ext;
    return _ref = {
      backgroundImage: "url(" + filename + "." + ext + ")"
    }, _ref[hiDPI()] = _extends__default["default"]({
      backgroundImage: "url(" + rFilename + ")"
    }, backgroundSize ? {
      backgroundSize: backgroundSize
    } : {}), _ref;
  }
A helper to generate a retina background image and non-retina
background image. The retina background image will output to a HiDPI media query. The mixin uses
a _2x.png filename suffix by default.

@example
// Styles as object usage
const styles = {
 ...retinaImage('my-img')
}

// styled-components usage
const div = styled.div`
  ${retinaImage('my-img')}
`

// CSS as JS Output
div {
  backgroundImage: 'url(my-img.png)',
  '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
   only screen and (min--moz-device-pixel-ratio: 1.3),
   only screen and (-o-min-device-pixel-ratio: 1.3/1),
   only screen and (min-resolution: 144dpi),
   only screen and (min-resolution: 1.5dppx)': {
    backgroundImage: 'url(my-img_2x.png)',
  }
}