| Total Complexity | 2 |
| Complexity/F | 2 |
| Lines of Code | 23 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | var factory = function (id, successful) { |
||
| 2 | var terminal = typeof successful === 'boolean' |
||
| 3 | return { |
||
| 4 | id: id, |
||
| 5 | terminal: terminal, |
||
| 6 | successful: terminal ? successful : null |
||
| 7 | } |
||
| 8 | } |
||
| 9 | |||
| 10 | module.exports = { |
||
| 11 | /** |
||
| 12 | * @enum {TOperationStatus} |
||
| 13 | * @readonly |
||
| 14 | */ |
||
| 15 | OperationStatus: { |
||
| 16 | None: factory('None'), |
||
| 17 | Running: factory('Running'), |
||
| 18 | Aborted: factory('Aborted', true), |
||
| 19 | Finished: factory('Finished', true), |
||
| 20 | Failed: factory('Failed', false), |
||
| 21 | Tripped: factory('Tripped', false) |
||
| 22 | } |
||
| 23 | } |
||
| 24 |