for example , topic "enter" and "entering",when I try to clear the topic "enter",it would clear topic 'entering' at the same time. I am quite confused why use 'indexOf' instead of '===',below is the method.
PubSub.clearSubscriptions = function clearSubscriptions(topic){
var m;
for (m in messages){
if (messages.hasOwnProperty(m) && m.indexOf(topic) === 0 / * why use indexOf here ?*/){
delete messages[m];
}
}
};