src/Observable.js
function (onNext, onError) {
        var self = this, subscriber = new Observable();
        subscriber._onNext = onNext;
        subscriber._onError = onError;
        subscriber._nextErr = genNextErr(subscriber.next);

        subscriber.publisher = self;
        self.subscribers.push(subscriber);

        return subscriber;
    }
function (onNext, onError) {
        var self = this, subscriber = new Observable();
        subscriber._onNext = onNext;
        subscriber._onError = onError;
        subscriber._nextErr = genNextErr(subscriber.next);

        subscriber.publisher = self;
        self.subscribers.push(subscriber);

        return subscriber;
    }
function ( onNext , onError ) { var self = this , subscriber = new Observable ( ) ; subscriber . _onNext = onNext ; subscriber . _onError = onError ; subscriber . _nextErr = genNextErr ( subscriber . next ) ; subscriber . publisher = self ; self . subscribers . push ( subscriber ) ; return subscriber ; }
It will create a new Observable, like promise.
@param  {Function} onNext
@param  {Function} onError
@return {Observable}
It will create a new Observable like promise .