Skip to content

Allow passing array of subscription tokens into unsubscribe #187

@Arcanorum

Description

@Arcanorum

Would be nice to just pass an array of sub tokens and have them all unsubscribed.

Something like

const subs = [
    PubSub.subscribe(EVENT_1, (msg, data) => {
        ...
    }),
    PubSub.subscribe(EVENT_2, (msg, data) => {
        ...
    }),
    PubSub.subscribe(EVENT_3, (msg, data) => {
        ...
    }),
];

// then later...

PubSub.unsubscribe(subs);

:^)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions