[{"data":1,"prerenderedAt":218},["ShallowReactive",2],{"project-2359656":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":39,"post_text":29,"what":42,"said":66,"maker_in_thread":135,"shape":144,"grid":148,"attempts":181,"same_week":182,"maker_shows":34,"maker_hidden":211,"reader_version":212,"card":213},"2359656","MicroEvent.js","js micro event emitter in less than 20lines","title","Show HN: MicroEvent.js - js micro event emitter in less than 20lines","http:\u002F\u002Fnotes.jetienne.com\u002F2011\u002F03\u002F22\u002Fmicroeventjs.html","notes.jetienne.com","jerome_etienne",1300892435,2011,60,15,213,1097,20,"notable","languages","javascript event library","library",[24,25,26,27],"javascript","event emitter","mixin","pubsub","quiet",null,{"positive":31,"neutral":32,"mixed":33,"critical":32},2,1,0,4,{"execution":36,"design":37,"idea":38},{"positive":32,"critical":33},{"positive":32,"critical":33},{"positive":33,"critical":32},[40,33,40,33,32,33,33,33,33,33,33,33,33,41,33],5,3,{"problem":43,"audience":29,"pricing":29,"motivation":54,"time_to_build":29,"stack":59,"openness":65,"stage":65,"team_size":65},{"value":44,"source":45,"evidence":46},"Lightweight event emitting for JavaScript without a large framework","inferred",[47,51],{"id":48,"by":49,"text":50},"2359764","yatsyk","Backbone by documentcloud could be the other option to consider because 4k of gzipped code is not so big also.",{"id":52,"by":11,"text":53},"2359975","backbone is super nice, i wont be the one saying otherwise. It isn't the same scope tho. It does event emitter and much much more! I like micro frameworks (aka tiny libraries)…",{"value":55,"source":56,"evidence":57},"Maker likes micro frameworks that are small enough to maintain yourself","maker",[58],{"id":52,"by":11,"text":53},[60],{"value":61,"source":45,"evidence":62},"JavaScript",[63],{"id":64},"post","unknown",{"praise":67,"objections":80,"requests":95,"questions":108,"alternatives":116},[68,76],{"value":69,"source":70,"evidence":71},"Code is well written and clean","commenter",[72],{"id":73,"by":74,"text":75},"2360171","amadeus","I really like the code, I think it's very well written! A couple small suggestions and thoughts: Add a couple lines so that all methods return this; to allow for chaining,…",{"value":77,"source":56,"evidence":78},"Small size makes it easy to maintain",[79],{"id":52,"by":11,"text":53},[81,88],{"value":82,"source":70,"evidence":83},"Tiny scripts would be better inlined in HTML than fetched over HTTP",[84],{"id":85,"by":86,"text":87},"2360266","aw3c2","Wouldn't tiny code like this better included in the HTML itself? A fraction of a packet size versus a HTTP request.",{"value":89,"source":70,"evidence":90},"Concatenating and compressing scripts may not always be fastest",[91],{"id":92,"by":93,"text":94},"2361573","morganpyne","This has been shown to not necessarily always be the best option for performance. See http:\u002F\u002Fblog.getify.com\u002F2009\u002F11\u002Flabjs-why-not-just-concat\u002F, and http:\u002F\u002Fyepnopejs.com\u002F The…",[96,103],{"value":97,"source":70,"evidence":98},"Return this from methods to allow chaining",[99,100],{"id":73,"by":74,"text":75},{"id":101,"by":74,"text":102},"2360476","Since I'll probably be using this for a couple smaller things of mine, I forked it and went ahead and changed it to: subscribe\u002Funsubscribe\u002Fpublish and also added return this.…",{"value":104,"source":70,"evidence":105},"Rename bind\u002Funbind to avoid clash with ES5 Function.bind",[106,107],{"id":73,"by":74,"text":75},{"id":101,"by":74,"text":102},[109],{"value":110,"source":70,"evidence":111},"Why not bind, trigger or unbind on a function directly",[112],{"id":113,"by":114,"text":115},"2360090","peregrine","To be honest I was surprised you couldn't bind, trigger, or unbind on a function this way already. I guess I never came across a specific need for it.",[117,121,128],{"value":118,"source":70,"evidence":119},"Backbone",[120],{"id":48,"by":49,"text":50},{"value":122,"source":70,"evidence":123},"Eve",[124],{"id":125,"by":126,"text":127},"2361002","oscilloscope","Dmitry's got something similar, Eve: http:\u002F\u002Fdmitry.baranovskiy.com\u002Feve\u002F",{"value":129,"source":70,"evidence":130},"Jiverscripts conc.observable",[131],{"id":132,"by":133,"text":134},"2360173","maxogden","Reminds me of https:\u002F\u002Fgithub.com\u002Fjivesoftware\u002Fjiverscripts. Check out the conc.observable component",{"comments":41,"answered":33,"key":136},[137,140,143],{"id":138,"text":139},"2360440","i had chained api before, and removed it for shortness. your point on api name is good. which name would you suggest ? something standard and readable and im sold :)",{"id":141,"text":142},"2360707","cool. will look at it. lets take this on github",{"id":52,"text":53},{"commenters":145,"max_depth":34,"maker_replies":41,"first_comment_mins":146,"lifespan_hours":147},11,23,7,[149,151,153,155,157,159,163,166,170,172,174,175,177,178,180],[73,33,40,150,74,33],"project\u002Fpositive\u002Fexecution",[138,33,33,152,11,32],"maker\u002Fneutral\u002Fdesign",[101,33,40,154,74,33],"project\u002Fpositive\u002Fdesign",[141,33,33,156,11,32],"maker\u002Fneutral\u002Fnone",[85,32,32,158,86,33],"project\u002Fcritical\u002Fidea",[160,32,33,161,162,33],"2360282","commenter\u002Fneutral\u002Fnone","udp",[164,32,33,161,165,33],"2360347","rbranson",[167,32,33,168,169,33],"2360598","other\u002Fneutral\u002Fnone","DTrejo",[171,32,33,161,74,33],"2360328",[92,32,33,173,93,33],"commenter\u002Fneutral\u002Fperformance",[48,31,33,168,49,33],[52,31,33,176,11,32],"project\u002Fpositive\u002Fidea",[132,41,33,168,133,33],[113,34,41,179,114,33],"project\u002Fneutral\u002Fnone",[125,40,33,168,126,33],[],[183,188,193,198,202,206],{"id":184,"name":185,"points":186,"category":187},"2345366","FaceCash",75,"web_saas",{"id":189,"name":190,"points":191,"category":192},"2354276","science",70,"learning_science",{"id":194,"name":195,"points":196,"category":197},"2344501","Frozenhot",67,"consumer_social",{"id":199,"name":200,"points":201,"category":192},"2356402","Education News",53,{"id":203,"name":204,"points":205,"category":197},"2341034","PodCastle",40,{"id":207,"name":208,"points":209,"category":210},"2341390","Student-hacker builds specialized HN Newsfeed for Pulse",31,"productivity",false,"v2",{"id":214,"name":5,"line":6,"ai":211,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":215,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":216,"url":9,"mix":217,"praise":69,"objection":82,"sub":21},2359656,[24,25,26,27],"505010000000030",[31,32,33,32],1793990871622]