Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const options = colorSchemeIds.map(scheme => {
let colors = []
if (isCategoricalColorScheme(scheme)) {
colors = colorSchemes[scheme]
} else if (isDivergingColorScheme(scheme)) {
colors = colorSchemes[scheme][11]
} else if (isSequentialColorScheme(scheme)) {
colors = colorSchemes[scheme][9]
}
return {
label: scheme,
value: scheme,
colors,
}
})