(configured, configuredAlt, presets)
| 49 | // that reshuffled itself around the current value would bounce between two |
| 50 | // entries instead of walking. |
| 51 | function clockFormatRing(configured, configuredAlt, presets) { |
| 52 | var ring = [] |
| 53 | var candidates = (presets || []).concat([configuredAlt, configured]) |
| 54 | for (var i = 0; i < candidates.length; i++) { |
| 55 | var format = String(candidates[i] === undefined || candidates[i] === null ? "" : candidates[i]) |
| 56 | if (format === "" || ring.indexOf(format) !== -1) continue |
| 57 | ring.push(format) |
| 58 | } |
| 59 | return ring.length > 0 ? ring : ["HH:mm"] |
| 60 | } |
| 61 | |
| 62 | // Next entry after `current`. An unknown current format (a hand-written one |
| 63 | // that is not in the ring) starts the walk at the top. |
nothing calls this directly
no outgoing calls
no test coverage detected