Fixed Need to make checks that the callback is a proper function and eventName is a proper value as well #2

Fixed Null/undefined for param values to 'on' and 'once' methods.
Nice, I like it, I will work in it.


On Thu, Jul 24, 2014 at 9:07 AM, Alexey Novak <notifications@github.com>
wrote:

> In src/events.js:
>
> > @@ -60,9 +60,15 @@ var utils = utils || {};
> >        };
> >      },
> >      on: function Events_subscribe(eventName, callback) {
> > +      if (!eventName || !callback || typeof callback != 'function') {
>
> Can you add this check into _addListener() instead? This way we will avoid
> code duplication and test will have to be done only for _addListener()
> instead of on() and once()
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/anvk/Events.js/pull/6/files#r15344700>.
>