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.
Awesome analysis I will check for event name to only be non empty string
On Jul 24, 2014 9:08 AM, "Alexey Novak" <notifications@github.com> wrote:

> In src/events.js:
>
> >        return this._addListener(eventName, callback, false);
> >      },
> >      once: function Events_once(eventName, callback) {
> > +      if (!eventName || !callback || typeof callback != 'function') {
>
> What happens if I pass eventName as true, or 5, or 1.78 or -800 or { a:
> null } ?
> Maybe it makes sense to have a check for eventName to be a string? Not
> sure how the examples ^ will work
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/anvk/Events.js/pull/6/files#r15344769>.
>