ES5兼容 object.assign Object.values

ES5兼容 object.assign Object.values

Object.assign = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
Ojbect.values = Object.values || Object.keys(obj).map(function (key) {return obj[key];});

你可能感兴趣的:(前端H5)