pusher/pusher-js — Issue #15: check pusher.subscribe(channel_name) parameter
Author: leggetter
Created: 2011-12-27 13:34:58+00:00
State: open

There's no parameter checking at the moment:
https://github.com/pusher/pusher-js/blob/master/src/pusher.js#L75

Maybe something like:

subscribe: function(channel_name) {
if( (channel_name instanceof String) === false ) {
throw '"channel_name" must be of type String'
}
// ... other code
}

Similar to the parameter checking work being undertaken on the `Pusher` constructor.