issues
search
Dygmalab
/
Bazecor
Graphical configurator for Dygma Products
https://dygma.com/
GNU General Public License v3.0
405
stars
90
forks
source link
fix: Add tests for the various parsers and cover edge cases
#947
Open
lbrooks
opened
2 weeks ago
lbrooks
commented
2 weeks ago
List of updates to the method:
Sanitize numbers to ensure within [0-255]
When called with isRgbw == false, numbers outside of [0-255[ could make it into the PaletteType[] returned
When there aren't enough values to complete the last color, fill the missing values with 0s
In the previous code, the value would contain NaN
Simplify logic
Switched from a reducer needing state to a simple for loop
Add tests to cover all edge cases
List of updates to the method: