mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
* Bump `eslint-plugin-react`
* Add `eslint-config-xo-react`
* Add XO
* Remove eslint-related dependencies, add XO config and use XO as the linter
* Code style: Standard => XO ✨
* Use xo property to ignore files
* Fix remaining errors
31 lines
510 B
JavaScript
31 lines
510 B
JavaScript
const colorList = [
|
|
'black',
|
|
'red',
|
|
'green',
|
|
'yellow',
|
|
'blue',
|
|
'magenta',
|
|
'cyan',
|
|
'white',
|
|
'lightBlack',
|
|
'lightRed',
|
|
'lightGreen',
|
|
'lightYellow',
|
|
'lightBlue',
|
|
'lightMagenta',
|
|
'lightCyan',
|
|
'lightWhite',
|
|
'colorCubes',
|
|
'grayscale'
|
|
];
|
|
|
|
export function getColorList(colors) {
|
|
// For backwards compatibility, return early if it's already an array
|
|
if (Array.isArray(colors)) {
|
|
return colors;
|
|
}
|
|
|
|
return colorList.map(colorName => {
|
|
return colors[colorName];
|
|
});
|
|
}
|