UNPKG

460 BJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = void 0;
5/**
6 * Reduces hex values if possible e.g. #ff8866 to #f86
7 * @private
8 */
9var reduceHexValue = function reduceHexValue(value) {
10 if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
11 return "#" + value[1] + value[3] + value[5];
12 }
13 return value;
14};
15var _default = exports["default"] = reduceHexValue;
16module.exports = exports.default;
\No newline at end of file