deleteSubscription(subscription) {
                if (!subscription instanceof Subscription) throw new Error("Expected a Subscription");
                if (!this.hasSubscription(subscription)) {
                    log(LOG_LEVEL.WARNING, `WARNING: Could not remove Subscription: ${subscription.getSubscriptionString()} because it doesn't exist.`);
                    return undefined;
                }
                this._subscriptions = this.getSubscriptions().filter(value => !value.equals(subscription));
                log(LOG_LEVEL.VERBOSE, `VERBOSE: Removed Subscription: '${subscription.getSubscriptionString()}' from SubscriptionStore.`);
                this.saveToStore();
                log(LOG_LEVEL.INFO, `INFO: Removed Subscription: '${subscription.getSubscriptionString()}' from Storage.`);
                return subscription;
            }
/**
             * Removed a subscription from the storage.
             * @param {Subscription}subscription - the subscription which should be removed.
             * @returns {Subscription} returns the removed subscription or undefined if it doesn't exist.
             */
Removed a subscription from the storage.
@param {Subscription}subscription - the subscription which should be removed.
@returns {Subscription} returns the removed subscription or undefined if it doesn't exist.
Removed a subscription from the storage . @param { Subscription } subscription - the subscription which should be removed . @returns { Subscription } returns the removed subscription or undefined if it doesn ' t exist .
deleteSubscription(subscription) {
                if (!subscription instanceof Subscription) throw new Error("Expected a Subscription");
                if (!this.hasSubscription(subscription)) {
                    log(LOG_LEVEL.WARNING, `WARNING: Could not remove Subscription: ${subscription.getSubscriptionString()} because it doesn't exist.`);
                    return undefined;
                }
                this._subscriptions = this.getSubscriptions().filter(value => !value.equals(subscription));
                log(LOG_LEVEL.VERBOSE, `VERBOSE: Removed Subscription: '${subscription.getSubscriptionString()}' from SubscriptionStore.`);
                this.saveToStore();
                log(LOG_LEVEL.INFO, `INFO: Removed Subscription: '${subscription.getSubscriptionString()}' from Storage.`);
                return subscription;
            }
deleteSubscription ( subscription ) { if ( ! subscription instanceof Subscription ) throw new Error ( "Expected a Subscription" ) ; if ( ! this . hasSubscription ( subscription ) ) { log ( LOG_LEVEL . WARNING , ` ${ subscription . getSubscriptionString ( ) } ` ) ; return undefined ; } this . _subscriptions = this . getSubscriptions ( ) . filter ( value => ! value . equals ( subscription ) ) ; log ( LOG_LEVEL . VERBOSE , ` ${ subscription . getSubscriptionString ( ) } ` ) ; this . saveToStore ( ) ; log ( LOG_LEVEL . INFO , ` ${ subscription . getSubscriptionString ( ) } ` ) ; return subscription ; }
Removed a subscription from the storage.
Removed a subscription from the storage .