Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update microevent on npm #29

Open
livtanong opened this issue Dec 21, 2014 · 6 comments
Open

Update microevent on npm #29

livtanong opened this issue Dec 21, 2014 · 6 comments

Comments

@livtanong
Copy link

It was last updated 3 years ago, and the mixin method is outdated, lacking the conditional supporting destObjects that don't have constructors.

@jeromeetienne
Copy link
Owner

not sure what is your point, but i use it everyday.

@livtanong
Copy link
Author

In npm:

 MicroEvent.mixin   = function(destObject){
    var props   = ['bind', 'unbind', 'trigger'];
    for(var i = 0; i < props.length; i ++){
        destObject.prototype[props[i]]  = MicroEvent.prototype[props[i]];
    }
 }

In http://notes.jetienne.com/2011/03/22/microeventjs.html

MicroEvent.mixin    = function(destObject){
    var props   = ['bind', 'unbind', 'trigger'];
    for(var i = 0; i < props.length; i ++){
        if( typeof destObject === 'function' ){
            destObject.prototype[props[i]]  = MicroEvent.prototype[props[i]];
        }else{
            destObject[props[i]] = MicroEvent.prototype[props[i]];
        }
    }
}

The two versions are different.

@dgellow
Copy link

dgellow commented Feb 18, 2015

@levitanong As I encountered the same problem I have pushed a recent version on npm under the name microevent-github.

@mvattuone
Copy link

This isn't really a problem, but it is confusing to have multiple versions of the same library with different source suffixes. I'm going to use microevent-github for now but it'd be preferrable to use microevent.

@dgellow
Copy link

dgellow commented Oct 28, 2015

I totally agree.

@dts
Copy link

dts commented May 16, 2016

+1 - please update on NPM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants