UNPKG

react-ionicons

Version:

A React SVG ionicon component

27 lines (22 loc) 846 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = sortPrefixedStyle; var _isPrefixedProperty = require('./isPrefixedProperty'); var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function sortPrefixedStyle(style) { return Object.keys(style).sort(function (left, right) { if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) { return -1; } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) { return 1; } return 0; }).reduce(function (sortedStyle, prop) { sortedStyle[prop] = style[prop]; return sortedStyle; }, {}); } module.exports = exports['default'];