flow like the river

This commit is contained in:
root 2025-11-07 00:06:12 +01:00
commit 013fe673f3
42435 changed files with 5764238 additions and 0 deletions

View file

@ -0,0 +1,19 @@
// @flow
/**
* Reduces hex values if possible e.g. #ff8866 to #f86
* @private
*/
const reduceHexValue = (value: string): string => {
if (
value.length === 7
&& value[1] === value[2]
&& value[3] === value[4]
&& value[5] === value[6]
) {
return `#${value[1]}${value[3]}${value[5]}`
}
return value
}
export default reduceHexValue