Skip to content

Instantly share code, notes, and snippets.

@AhmedTarekHasan
Last active October 19, 2021 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AhmedTarekHasan/8b1299370c0aabec3c7439a870d43ce1 to your computer and use it in GitHub Desktop.
Save AhmedTarekHasan/8b1299370c0aabec3c7439a870d43ce1 to your computer and use it in GitHub Desktop.
Subscription.js
let Subscription = function(handlerId, unsubscribeNotificationCallback) {
let self = this;
self.unsubscribe = () => {
if(unsubscribeNotificationCallback) {
unsubscribeNotificationCallback(handlerId);
}
};
return self;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment