You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
420 B
20 lines
420 B
//PubSub
|
|
PubSub.subscribes = function (events, action) {
|
|
if (!events || !action) {
|
|
return;
|
|
}
|
|
for (var i = 0; i < events.length; i++) {
|
|
PubSub.subscribe(events[i], function (m, d) { action(m, d); });
|
|
}
|
|
}
|
|
|
|
PubSub.unsubscribes = function (events) {
|
|
if (!events) {
|
|
return;
|
|
}
|
|
for (var i = 0; i < events.length; i++) {
|
|
PubSub.unsubscribe(events[i]);
|
|
}
|
|
}
|
|
//Axios
|