Code coverage report for cjs/util/toSubscriber.js

Statements: 100% (10 / 10)      Branches: 100% (8 / 8)      Functions: 100% (1 / 1)      Lines: 100% (10 / 10)      Ignored: none     

All files » cjs/util/ » toSubscriber.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 151 1 1 7886 5531 5327   204 184     2375   1  
var Subscriber_1 = require('../Subscriber');
var rxSubscriber_1 = require('../symbol/rxSubscriber');
function toSubscriber(next, error, complete) {
    if (next && typeof next === 'object') {
        if (next instanceof Subscriber_1.Subscriber) {
            return next;
        }
        else if (typeof next[rxSubscriber_1.rxSubscriber] === 'function') {
            return next[rxSubscriber_1.rxSubscriber]();
        }
    }
    return new Subscriber_1.Subscriber(next, error, complete);
}
exports.toSubscriber = toSubscriber;
//# sourceMappingURL=toSubscriber.js.map