* Get the maximum of two values, handling both numbers and Dates
(a: any, b: any)
| 1163 | * Get the maximum of two values, handling both numbers and Dates |
| 1164 | */ |
| 1165 | function maxValue(a: any, b: any): any { |
| 1166 | if (a instanceof Date && b instanceof Date) { |
| 1167 | return a.getTime() > b.getTime() ? a : b |
| 1168 | } |
| 1169 | return Math.max(a, b) |
| 1170 | } |
| 1171 | |
| 1172 | /** |
| 1173 | * Get the minimum of two values, handling both numbers and Dates |
no outgoing calls
no test coverage detected