UNPKG

541 BJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.brcast=t()}(this,function(){return function(e){var t={},n=1,o=e;return{getState:function(){return o},setState:function(e){o=e;for(var n=Object.keys(t),r=0,u=n.length;r<u;r++)t[n[r]]&&t[n[r]](e)},subscribe:function(e){if("function"!=typeof e)throw new Error("listener must be a function.");var o=n;return t[o]=e,n+=1,o},unsubscribe:function(e){delete t[e]}}}});
2//# sourceMappingURL=brcast.umd.min.js.map