()
| 588 | } |
| 589 | |
| 590 | function factory() { |
| 591 | var cstor, options; |
| 592 | if (typeof arguments[0] === 'function') { |
| 593 | cstor = arguments[0]; |
| 594 | options = arguments[1] || {}; |
| 595 | } |
| 596 | else { |
| 597 | cstor = function() { this._fsm.apply(this, arguments) }; |
| 598 | options = arguments[0] || {}; |
| 599 | } |
| 600 | var config = new Config(options, StateMachine); |
| 601 | build(cstor.prototype, config); |
| 602 | cstor.prototype._fsm.config = config; // convenience access to shared config without needing an instance |
| 603 | return cstor; |
| 604 | } |
| 605 | |
| 606 | //------------------------------------------------------------------------------------------------- |
| 607 |
no test coverage detected