(fsm, options)
| 116 | //------------------------------------------------------------------------------------------------- |
| 117 | |
| 118 | function dotcfg(fsm, options) { |
| 119 | |
| 120 | options = options || {} |
| 121 | |
| 122 | var config = dotcfg.fetch(fsm), |
| 123 | name = options.name, |
| 124 | rankdir = dotcfg.rankdir(options.orientation), |
| 125 | states = dotcfg.states(config, options), |
| 126 | transitions = dotcfg.transitions(config, options), |
| 127 | result = { } |
| 128 | |
| 129 | if (name) |
| 130 | result.name = name |
| 131 | |
| 132 | if (rankdir) |
| 133 | result.rankdir = rankdir |
| 134 | |
| 135 | if (states && states.length > 0) |
| 136 | result.states = states |
| 137 | |
| 138 | if (transitions && transitions.length > 0) |
| 139 | result.transitions = transitions |
| 140 | |
| 141 | return result |
| 142 | } |
| 143 | |
| 144 | //------------------------------------------------------------------------------------------------- |
| 145 |
no outgoing calls
no test coverage detected