import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

/**
 * prefixBroswerHack.js
 *
 * @Author: apple
 * @Date: 2018/4/25 19:34
 */
// 为js里面的css加各个浏览器的前缀
var prefixBroswerHack = function prefixBroswerHack(jsStyle) {
  var allStyle = [jsStyle];
  var prefixBroswer = ['Webkit', 'ms', 'O'];
  prefixBroswer.forEach(function (item) {
    allStyle.push(_defineProperty({}, item + Object.keys(jsStyle)[0].replace(/( |^)[a-z]/g, function (L) {
      return L.toUpperCase();
    }), Object.values(jsStyle)[0]));
  });
  return allStyle;
};

export default prefixBroswerHack;