forked from rDrama/rDrama
1
0
Fork 0
rDrama/node_modules/tailwindcss/lib/util/flattenColorPalette.js

15 lines
484 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
const flattenColorPalette = colors => Object.assign({}, ...Object.entries(colors || {}).flatMap(([color, values]) => typeof values == 'object' ? Object.entries(flattenColorPalette(values)).map(([number, hex]) => ({
[color + (number === 'DEFAULT' ? '' : `-${number}`)]: hex
})) : [{
[`${color}`]: values
}]));
var _default = flattenColorPalette;
exports.default = _default;