# All files / utils styleReducer.ts

100% Statements 4/4
80% Branches 4/5
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    132x

    9x
    1x

    8x

     export const styleReducer = (
      classes: object,
      accumulator: string,
      current: string
    ): string => {
      if (classes[current]) {
        return accumulator
          ? `${accumulator} ${classes[current]}`
          : `${classes[current]}`
      }
      return accumulator ? `${accumulator} ${current}` : `${current}`
    }