( periodString: string | null, defaultValue: string, timePeriodOptions: TimePeriodOptions, )
| 60 | }; |
| 61 | |
| 62 | const parseTimePeriod = ( |
| 63 | periodString: string | null, |
| 64 | defaultValue: string, |
| 65 | timePeriodOptions: TimePeriodOptions, |
| 66 | ) => { |
| 67 | const period = |
| 68 | periodString && Object.keys(timePeriodOptions).includes(periodString) |
| 69 | ? periodString |
| 70 | : defaultValue; |
| 71 | return parseInt(period); |
| 72 | }; |
| 73 | |
| 74 | const timePeriodFromUrl = ( |
| 75 | defaultValue: string, |
no test coverage detected