pubnub/javascript — pull request #36 by gdi2290 (2014-06-28 03:20:24+00:00)
Title: expose isArray function

PUBNUB.isArray function would be useful for the code snippet below since this accounts for the Array-like arguments object. I would normally use isArray method on the Array constructor which doesn't account for arguments object edge case
```javascript
PUBNUB.publish = PUBNUB._publish;
PUBNUB.publish = function(body) {
var channels = body.channel;
if (typeof channels === 'string' && (/,/i).test(channels)) {
this.publish(channels.split(','));
} else if (this.isArray(channels)) {
this.each(Array.prototype.slice.call(channels, 0), function(channel) {
body.channel = channel;
this.publish(body);
});
} else {
this._publish(body);
}
};
```