* Check if two SpanProps are equal for merging.
(a: SpanProps, b: SpanProps)
| 210 | * Check if two SpanProps are equal for merging. |
| 211 | */ |
| 212 | function propsEqual(a: SpanProps, b: SpanProps): boolean { |
| 213 | return a.color === b.color && a.backgroundColor === b.backgroundColor && a.bold === b.bold && a.dim === b.dim && a.italic === b.italic && a.underline === b.underline && a.strikethrough === b.strikethrough && a.inverse === b.inverse && a.hyperlink === b.hyperlink; |
| 214 | } |
| 215 | function hasAnyProps(props: SpanProps): boolean { |
| 216 | return props.color !== undefined || props.backgroundColor !== undefined || props.dim === true || props.bold === true || props.italic === true || props.underline === true || props.strikethrough === true || props.inverse === true || props.hyperlink !== undefined; |
| 217 | } |