{"version":3,"file":"pubsub.min.js","sources":["pubsub.js"],"sourcesContent":["/* JQuery Tiny Pub/Sub - v0.7 - 10/27/2011\r\n * http://benalman.com/\r\n * Copyright (c) 2011 \"Cowboy\" Ben Alman; Licensed MIT, GPL */\r\n\r\nwindow.pubsub = (function ($) {\r\n var o = $({});\r\n\r\n $.subscribe = function () {\r\n o.on.apply(o, arguments);\r\n };\r\n\r\n $.unsubscribe = function () {\r\n o.off.apply(o, arguments);\r\n };\r\n\r\n $.publish = function () {\r\n o.trigger.apply(o, arguments);\r\n };\r\n})(jQuery);\r\n\r\n// Super-basic example:\r\n\r\n// function handle(e, a, b, c) {\r\n// `e` is the event object, you probably don't care about it.\r\n// console.log(a + b + c);\r\n// };\r\n\r\n// $.subscribe(\"/some/topic\", handle);\r\n\r\n// $.publish(\"/some/topic\", [\"a\", \"b\", \"c\"]);\r\n// logs: abc\r\n\r\n// $.unsubscribe(\"/some/topic\", handle); // Unsubscribe just this handler\r\n\r\n// Or:\r\n\r\n// $.subscribe(\"/some/topic\", function (e, a, b, c) {\r\n// console.log(a + b + c);\r\n// });\r\n\r\n// $.publish(\"/some/topic\", [\"a\", \"b\", \"c\"]);\r\n// logs: abc\r\n// Unsubscribe all handlers for this topic\r\n// $.unsubscribe(\"/some/topic\");\r\n"],"names":["window","pubsub","$","o","subscribe","on","apply","arguments","unsubscribe","off","publish","trigger","jQuery"],"mappings":"AAIAA,OAAOC,OAAS,SAAWC,GACvB,IAAIC,EAAID,EAAE,EAAE,EAEZA,EAAEE,UAAY,WACVD,EAAEE,GAAGC,MAAMH,EAAGI,SAAS,CAC3B,EAEAL,EAAEM,YAAc,WACZL,EAAEM,IAAIH,MAAMH,EAAGI,SAAS,CAC5B,EAEAL,EAAEQ,QAAU,WACRP,EAAEQ,QAAQL,MAAMH,EAAGI,SAAS,CAChC,CACH,EAAEK,MAAM"}