polished icon indicating copy to clipboard operation
polished copied to clipboard

Refactor: add color type helper

Open thadeucity opened this issue 3 years ago • 1 comments

A color object type is being checked the same way in 3 parts of the code. hslToColorString.js , rgbToColorString.js and toColorString.js. To simplify its use and also reduce the lib size, a helper function was created to identify the color object type.

The refactoring reduced the lib size by approximately 0.7% (Gziped) It is a marginal gain, but I believe any size improvement is a welcome one.

thadeucity avatar Oct 24 '22 17:10 thadeucity

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (a7e3dee) to head (108c170).

:exclamation: Current head 108c170 differs from pull request most recent head 019893c. Consider uploading reports for the commit 019893c to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #625   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           89        90    +1     
  Lines          860       847   -13     
  Branches       323       301   -22     
=========================================
- Hits           860       847   -13     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 30 '22 11:10 codecov[bot]