( diffs: Array<Diff>, op: number, hasCommon: boolean, )
| 146 | // * include change substrings which have argument op |
| 147 | // with change color only if there is a common substring |
| 148 | const joinDiffs = ( |
| 149 | diffs: Array<Diff>, |
| 150 | op: number, |
| 151 | hasCommon: boolean, |
| 152 | ): string => |
| 153 | diffs.reduce( |
| 154 | (reduced: string, diff: Diff): string => |
| 155 | reduced + |
| 156 | (diff[0] === DIFF_EQUAL |
| 157 | ? diff[1] |
| 158 | : diff[0] === op |
| 159 | ? hasCommon |
| 160 | ? INVERTED_COLOR(diff[1]) |
| 161 | : diff[1] |
| 162 | : ''), |
| 163 | '', |
| 164 | ); |
| 165 | |
| 166 | const isLineDiffable = (received: unknown): boolean => { |
| 167 | const receivedType = getType(received); |
no outgoing calls
no test coverage detected