UNPKG

ac-node

Version:

A common module for building Atlassian Connect add-ons

25 lines (19 loc) 536 B
var MemoryStore = require('./store-memory'); function WebhookManager(store) { if (!(this instanceof WebhookManager)) { return new WebhookManager(); } this._store = MemoryStore(); } WebhookManager.prototype.get = function (name) { return this._store.get(name); }; WebhookManager.prototype.add = function (name, definition) { return this._store.set(name, definition); }; WebhookManager.prototype.remove = function (name) { return this._store.del(name); }; module.exports = function () { return WebhookManager(); };