(map: Map<T, V>, key: T, defaultValue: V)
| 139 | } |
| 140 | |
| 141 | export function getOrSetDefaultValue<T, V>(map: Map<T, V>, key: T, defaultValue: V) { |
| 142 | let value = map.get(key); |
| 143 | if (!value) { |
| 144 | map.set(key, (value = defaultValue)); |
| 145 | } |
| 146 | return value; |
| 147 | } |
| 148 | |
| 149 | export function parseTimelineCommand(command: string): [string, string] { |
| 150 | const separatorPos = command.indexOf(':'); |
no test coverage detected