Code coverage report for cjs/observables/DeferObservable.js

Statements: 90.91% (30 / 33)      Branches: 61.11% (11 / 18)      Functions: 100% (7 / 7)      Lines: 96% (24 / 25)      Ignored: none     

All files » cjs/observables/ » DeferObservable.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51    1   2   1   1   1   1   1   1   1   1 1   1 1   1 1         1 1     1 1 1     1       1     1 1  
'use strict';
 
exports.__esModule = true;
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 
function _classCallCheck(instance, Constructor) { Iif (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
 
function _inherits(subClass, superClass) { Iif (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); Eif (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var _Observable2 = require('../Observable');
 
var _Observable3 = _interopRequireDefault(_Observable2);
 
var _utilTryCatch = require('../util/tryCatch');
 
var _utilTryCatch2 = _interopRequireDefault(_utilTryCatch);
 
var _utilErrorObject = require('../util/errorObject');
 
var DeferObservable = (function (_Observable) {
    _inherits(DeferObservable, _Observable);
 
    function DeferObservable(observableFactory) {
        _classCallCheck(this, DeferObservable);
 
        _Observable.call(this);
        this.observableFactory = observableFactory;
    }
 
    //# sourceMappingURL=DeferObservable.js.map
 
    DeferObservable.create = function create(observableFactory) {
        return new DeferObservable(observableFactory);
    };
 
    DeferObservable.prototype._subscribe = function _subscribe(subscriber) {
        var result = _utilTryCatch2['default'](this.observableFactory)();
        Iif (result === _utilErrorObject.errorObject) {
            subscriber.error(_utilErrorObject.errorObject.e);
        } else {
            result.subscribe(subscriber);
        }
    };
 
    return DeferObservable;
})(_Observable3['default']);
 
exports['default'] = DeferObservable;
module.exports = exports['default'];
//# sourceMappingURL=DeferObservable.js.map