5 ms·
Ask HN: What is the coolest JS library out there?
Pretty open ended question. Just trying to see what cool stuff is out there to play around with.
- dottrap 14y agoCappuccino (with Objective-J). One of those, 'so batsh#t crazy, it's brilliant' things. Note they are one of those that make a distinction between a library and framework. http://280north.com http://280north.com http://www.cappuccino-project.org http://www.cappuccino-project.org http://arstechnica.com/apple/2008/06/cocoa-on-the-web-280-north-objective-j-and-cappuccino/ http://arstechnica.com/apple/2008/06/cocoa-on-the-web-280-no...
- slater 14y agoDefine "cool"? Ease of use? Length of features list? What?
- cincinnatus 14y agoExciting. Something you are super glad you found.
- byoung2 14y agoAsync: https://github.com/caolan/async https://github.com/caolan/async - it helps avoid callback hell. I use it in node.js.
- dccoolgai 14y agoAgreed..I am starting to feel that you can't even do node right w/o it.
- jamespitts 14y agoCan't agree with you more. Caolan Async is super-useful in the client as well, particularly "until" (for waiting until a condition is met).
- RoboTeddy 14y agoBacon.js: https://github.com/raimohanska/bacon.js https://github.com/raimohanska/bacon.js -- functional reactive programming in javascript. It's another way out of callback hell when doing UI work.
- michaelsbradley 14y agoCheckout Flapjax as well: http://www.flapjax-lang.org/ http://www.flapjax-lang.org/ https://github.com/brownplt/flapjax/ https://github.com/brownplt/flapjax/ http://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flapjax/paper.pdf http://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgb... Amazingly, work on Flapjax dates all the way back to 2006! Let that sink in ... the point is that it was way ahead of its time, and with all due respect to bacon.js, I think Flapjax is still in in a league of its own with respect to how it's implemented. I studied the internals for months back in 2010, and that learning experience was a huge catalyst in pushing me toward functional programming, Clojure and ClojureScript. The reason Flapjax never quite caught on was in part, I think, that it was so ahead of its time. And also that its internals, while well engineered, are much harder to understand than those of jQuery and other popular libraries. It's harder to use something truly effectively if you can't quite wrap your head around how it works, and understanding Flapjax certainly takes dedication.
- davisr 14y agoI'm a huge fan of Enyo (http://enyojs.com http://enyojs.com). It's stupid-easy to get a native-feeling app running that works across (nearly) every modern device. Mostly, I love its UI components (which are expanded by the associated Onyx library), which means I have less lines of code to write -- which is always better.
- logn 14y agoadd TideSDK and PhoneGap for the native-feeling trifecta
- daleharvey 14y agoSeems like a reasonable time to self promote http://pouchdb.com/ http://pouchdb.com/ PouchDB is a full reimplementation of CouchDB inside the browser (using browser storage), you can build applications that work offline then sync your data with 'the cloud'
- axemclion 14y agoPouchDB rocks !!
- jedahan 14y agoAmazing, glad you plugged it here. Gonna test it for a project in the galleries here at the Met Museum, as our wifi is a bit flaky at times :)
- jheimark 14y agowhoa, this is interesting. makes one think it's now the time to write a middleware syncing library.
- kodablah 14y agoTypeScript. Fastest JS parser I've seen (at least in JS compared to coffeescript, esprima, narcissus, etc), bootstrapped in its own language, great type checker/inferencer, easy to follow codebase.
- TheHippo 14y agoIf you like TypeScript you should also checkout Haxe (http://haxe.org http://haxe.org)
- charliesome 14y agofuckit.js: https://github.com/mattdiamond/fuckitjs https://github.com/mattdiamond/fuckitjs
- trigoman 14y agoAt least it has very good documentation :D
- deleted 14y ago[deleted]
- imtu80 14y agoCheck following link and you tell me http://jster.net/ http://jster.net/.
- tapsboy 14y agoI also found http://jsdb.io http://jsdb.io useful
- agency 14y agod3.js (http://d3js.org/ http://d3js.org/) is the king of visualization libraries
- kingkool68 14y agoAgree. d3 looks awesome. See these great video tutorials for it http://vimeo.com/search/sort:alphabetical/format:detail?q=%22dot%20enter%22 http://vimeo.com/search/sort:alphabetical/format:detail?q=%2...
- nthitz 14y agoI love d3. I'll be using it and just amaze myself at how easy it is to do things with it sometimes.
- alphakappa 14y agod3 is an amazing library, both for the beauty of the framework API itself, and for how it can be used not just for SVG manipulation, but for general DOM manipulation itself. The power of d3.js is just beautiful.
- chunkyslink 14y agohttp://sugarjs.com/ http://sugarjs.com/ From the site "Sugar is a Javascript library that extends native objects with helpful methods. It is designed to be intuitive, unobtrusive, and let you do more with less code."
- dccoolgai 14y agoskrollr is pretty badass, IMO.
- deleted 14y ago[deleted]
- maxtardiveau 14y agoI'd vote for AngularJS. It's just very clever. Kudos to the Google folks who came up with it.
- tomasien 14y agoI know this is a crap answer to this question, but for me what is "cool" is what can easily do things that I think are awesome. For me, that's Angular.js. http://angularjs.org/ http://angularjs.org/ Angular UI is amazing http://angular-ui.github.com/ http://angular-ui.github.com/ And Angular for Bootstrap is also amazing http://angular-ui.github.com/bootstrap/ http://angular-ui.github.com/bootstrap/ I'm not a great programmer, so that's what excites me. It's flexible enough that as you get better as a programmer, you can plug that right in. And that's what I think is cool.
- kingkool68 14y agoI like TinySort which is a no-frills jQuery plugin to sort HTML elements. Great for data tables -> http://tinysort.sjeiti.com/ http://tinysort.sjeiti.com/ Speaking of data tables, I wrote a little function to make table headers sticky so they stay at the top of the viewport as you scroll down a large table. https://github.com/kingkool68/stickyHeader https://github.com/kingkool68/stickyHeader No options, just include on the page, add a class of stickyHeader on the table and you're done.
- kyriakos 14y agoThat's a really useful plugin you made. Thanks for sharing.
- danso 14y agounderscore.js has so many useful helper functions while being lightweight and unobtrusive: http://underscorejs.org/ http://underscorejs.org/
- re_todd 14y agoI discovered underscore.js recently, I really like it as well. After learning a little functional programming, it is cool to see things like map, contains, select, etc. brought into JavaScript in an easy-to-use way.
- impostervt 14y agoMay want to check out lodash https://github.com/bestiejs/lodash https://github.com/bestiejs/lodash
- Surio 14y agoRohan, Pretty difficult to parse "coolest JS library". The "42" for that question came up as "it depends for what" ;-) Anyway, I use this site as a quick reference to see what is new in JS world. www.functionn.in The author seems to be pretty meticulous in his updates, so there's a lot of interesting libraries. Seems like a labour of love for him. (P.S: Thanks, Hirvesh) There's also Hakim who comes up with some interesting stuff from time to time www.hakim.se Here's another that came up on radar lately -- http://soulwire.github.com/Makisu/ http://soulwire.github.com/Makisu/ Subscribe to the smashing letter magazine's newsletters for a periodic stream of latest "cool" into your Inbox. Hope that helps.
- beefsack 14y agoI'd have to say Q promises (https://github.com/kriskowal/q https://github.com/kriskowal/q, adds promises to JS for much cleaner async code). Even though it's not "cool" in the sense that it's very low level and doesn't do fancy UI stuff, my asynchronous code has become significantly cleaner and easier to maintain through using promises rather than having callback pyramids. The ability to wait for a number of promises to resolve before firing the next makes life so much easier too.
- Sephr 14y agoAnother library that tries to make async code much cleaner is async.js (https://github.com/eligrey/async.js#readme https://github.com/eligrey/async.js#readme). It uses yield and generators to abstract away the callback jungle. For example, you can easily condense tens of lines of event code into a single `event = yield document.next("click")`
- chadscira 14y agowhen.js is also pretty cool. I wrote a wrapper object for node that's been extremely useful https://github.com/icodeforlove/node-promise-object https://github.com/icodeforlove/node-promise-object
- paulocal 14y agoTHIS. I've been using this in my projects and it cuts a lot of work and makes my code way cleaner.
- hayksaakian 14y agoThe one that makes everyone's lives easier: jQuery. Its not sexy, but it gets the job done for pretty much everyone.
- gbog 14y agoI did prefer prototype.js in the time of ol'. Never understood why jQuery took over it, sadly.
- JungleGymSam 14y agoI think it was because of the lack of documentation. Back then prototype had none and jQuery had a lot. They had a rich site and prototype had a single spartan page.
- gbog 14y agoThis is not what I remember. I even have a printout of the full prototype doc hidden somewhere, it had clean and straightforward explanations for all the API. Scriptaculous, built upon prototype.js, was nice too.
- wwweston 14y agoMy guess is that jQuery targeted and solved a problem that was bigger for a broader base of people doing JavaScript development: the DOM API (and some other browser APIs) was both pretty awkward and inconsistent. Prototype.js seemed to be targeting the problem of providing a familiar class system, standardizing some functional features, and some utility functions. It was something else, and I loved experimenting with it and reading the source, but ultimately, I think fewer people were finding this to be their pain point with the language or that using it made them significantly more productive. Of course, considering the fact that they seem to solve different problems, it may be an interesting question why they were fighting for mindshare in the same space.
- darkchasma 14y agoI never looked that close, but I thought that prototype extended the base objects with the prototype property? If this is the case, then it wasn't a great idea. Meta programming is acceptable when you control the compiler or spec of the language, but as ECMA specifications move forward, and those functions are added, you'll get conflicts. And you can't control what browser is interpreting your javascript. Maybe I just didn't understand it well enough.
- goatslacker 14y agolz is the fastest lazy functional library to work with lists. https://github.com/goatslacker/lz https://github.com/goatslacker/lz Why I think it's cool? Well it's really fast, and it's lazy which allows you to work with really big arrays. Plus it's a really tiny library providing you with a streamlined set of APIs for working with lists (similar to array.js/Enumerable) If you're working with smaller lists it's probably best to go the lodash route, but if you want it to be lazy then I believe lz is the right tool for the job. /shameless plug
- rajrao 14y agoMy vote is for TypeScript (http://www.typescriptlang.org/ http://www.typescriptlang.org/). It fixes some of the problems that I encountered while creating an enterprise class application and not being able to strongly type parameters, classes, etc (which meant that I had to open up every JS file to figure out what parameters a function truly required).
- shtylman 14y agohttp://browserify.org/ http://browserify.org/ because it will fundamentally change how you approach writing and organizing front end code. The moment you stop writing boilerplate code to glue your disparate files together and start using a simple module system you will never look back. This is more than a library, it is a way of re-thinking how you can maintain js libraries going forward.
- nathanappere 14y agohttp://requirejs.org/ http://requirejs.org/ addresses the same problem (AMD style rather than nodejs require style)
- shtylman 14y agoAMD style is terrible and should be discouraged. It leaks how it does things too much into the source code and you again end up with boilerplate bs.
- olegp 14y agoI found that browserify tried to do too much by emulating Node within the browser so wrote JoinJS which just implements CommonJS modules without trying to parse the JS files: https://github.com/olegp/joinjs https://github.com/olegp/joinjs
- shtylman 14y agoNew version of browserify will be much leaner. Also, if you don't use the node modules it doesn't matter. Your thing could use some tests if you hope for people to trust it :)
- straws 14y agoI'm really in love with Component, which is a sort of package manager for front end development http://component.jit.su/ http://component.jit.su/ It breaks down large frameworks like jQuery, Underscore, Backbone, Twitter Bootstrap, etc into small, reusable, and composable micro libraries. There are UI elements like tool tips and modals, wonderful and tiny DOM manipulation tools, well documented AJAX libraries, and more low-level functional and control-flow related tools. It's really amazing. It's by TJ Holowaychuk too, who is huge in the node community (Express, Jade, Mocha, Stylus, Connect, and many others).
- readme 14y agoDefinitely try hipster.js. It works with node, mongodb, and it runs on plan9. Meteor integration is in the works.
- double051 14y agoThree.js is a wonderful way to experiment with 3D programming. Github repo: https://github.com/mrdoob/three.js/ https://github.com/mrdoob/three.js/ Examples: http://mrdoob.github.com/three.js/ http://mrdoob.github.com/three.js/
- TallboyOne 14y agoI'm a fan of how well the Ace code editor handles text editing, vim, emacs, etc. Non direct link (to plug my own site with lots of other similar stuff) http://pineapple.io/resources/ace-high-performance-embeddable-code-editor http://pineapple.io/resources/ace-high-performance-embeddabl... direct link http://ace.ajax.org/ http://ace.ajax.org/
- cheeaun 14y agoFor me, the coolest and most impressive JS lib would be http://lodash.com/ http://lodash.com/
- chjj 14y agoThis is going to be the most shameless plug I've ever done in my life, but I actually believe my css selector engine ( https://github.com/chjj/zest https://github.com/chjj/zest ) beats every other one into the ground in terms of speed, features, and extensibility. I've probably just been waiting for an opportunity to shout it from the rooftops. Unfortunately, it's kind of hard for a selector engine to gain momentum since people don't really use them standalone unless they're writing a dom library. It's not the coolest, but I think it's the coolest selector engine. I'm also totally biased.
- atirip 14y agoI'm not biased. +1
- simonsarris 14y ago(disclosure: shameless plug) I make GoJS, a HTML canvas-based diagramming library with all sorts of useful features. Node and link concepts (with data binding, templating), layouts, an undo manager, lots of customizable tools, drag and drop/cut and paste. In other words, a very rich set of diagramming features atop HTML5 canvas. I think its cool, because it took two years of canvas tomfoolery to get working well, and I think its much faster than similar diagramming libraries for canvas out right now. A lot of technically interesting stuff was encountered while making it, but I haven't had the time to write about my collected intricacies yet. http://gojs.net/beta/ http://gojs.net/beta/ Or straight to samples: http://gojs.net/beta/samples/flowchart.html http://gojs.net/beta/samples/flowchart.html Firefox warning[1] for that specific sample though. I need to change the default sample this week. [1] Super frustrating! The new IonMonkey JavaScript engine crashes under very certain conditions that are met during my link avoidsNodes algorithm. This means that Firefox 18 and 19 (but not 17 and 20) will crash on the Flowchart sample, because the link routing is set to use avoidsNodes. It's unfortunate but even though they're aware of the bug they aren't going to bother fixing it for FF19. https://bugzilla.mozilla.org/show_bug.cgi?id=830063 https://bugzilla.mozilla.org/show_bug.cgi?id=830063 ~~~ By the way, if there are other canvas library authors out there who have had interesting (or downright weird) issues with various canvas implementations, I'd love to hear from you!
- ineedtosleep 14y agoWow. Very very nice job there. I had project a while back and couldn't find too many options when it came to Javascript diagramming and had to settle with jsPlumb. I wish this was around at the time [edit] or at least more visible from my quick searching.
- kyriakos 14y agoNice work. Don't have a use for it right now but I'll keep an eye on it.
- ux-app 14y agoAmazing work! I was impressed to see that it is perfectly usable on an iPad
- benmanns 14y agoI've been having a lot of fun with https://github.com/harthur/brain https://github.com/harthur/brain (neural network implementation in JavaScript) lately. Perhaps it's not something you would use on a real, live site, but it is fun to prototype neural network stuff in the browser with easy access to the DOM, canvas, and WebGL.
- jesusabdullah 14y agoHeather's cat finding demos are siiiiick.
- tjmarshall 14y agoPotatoSalad.js is the best. I bet a bunch of you actually searched for that on google. What's sad is that is probably the name of some obscure testing library. What have we come to...?
- krapp 14y agoI made a broccoli.js once when I thought I needed a rudimentary canvas image editor, it never really went anywhere but over my head: https://github.com/kennethrapp/broccoli-js https://github.com/kennethrapp/broccoli-js but it's honestly terrible and even mentioning it in this thread is a terrible thing to do. I'm going to go think about what i've done now, over in the corner, there.
- devonbarrett 14y agoI would be interested in this. Does it work?
- krapp 14y agoAs a proof of concept yes (scaling, rotation, moving the background work) but it doesn't do much yet. I wanted to make something like Irfanview that could handle basic transforms with a minimalist ui, but it still needs a ton of work. Drawing is more or less broken - I got as far as adding pixels to the canvas before other (paying) projects just got in the way. When I figure out how to get it to work on a github page I'll have a demo up.
- krapp 14y agothis works too: http://htmlpreview.github.com/?https://github.com/kennethrapp/broccoli-js/blob/master/index.html http://htmlpreview.github.com/?https://github.com/kennethrap...
- aleksandrm 14y agoCheck out http://JSDB.io http://JSDB.io and http://pineapple.io http://pineapple.io -- both list a ton of cool JS libraries.
- ksokhan 14y agoIm the creator of JSDB, so thanks for the mention! In the interest of equality, theres a few more that are worth taking a look at: microjs.com, and http://jster.net/ http://jster.net/
- gbog 14y agohttps://github.com/dexteryy/OzJS https://github.com/dexteryy/OzJS a microkernel for modular javascript. Disc.: writen by a friend and colleague.
- dexteryy 14y agoActually, It's not just a library, or it's a library for anti-library (shift away from traditional All-in-One JS library or framework)...
- The1TrueGuy 14y agohttp://famo.us/c/ http://famo.us/c/ loved their demo at forbes. Haven't had a moment to do a hands-on with it yet but looks fun.
- jakelazaroff 14y agoEvery so often, someone writes a tool that makes you (or me, at least) super excited about web development. In 2006, that was jQuery. In 2013, that tool for me is Backbone. http://backbonejs.org/ http://backbonejs.org/ Just instantiate a model with an endpoint and an ID and Backbone will do all your syncing for you. You can have views listen for changes to the models and update automatically. You can add easy support for client-side navigation via push state. Backbone takes tedious tasks and makes them fun. Highly, highly recommended.
- jerbils 14y agoShameless plug time: I built Rekapi, which is a context-agnostic keyframe animation library. That means it works with DOM, Canvas, or whatever you need: http://rekapi.com/ http://rekapi.com/ It also supports exporting JavaScript keyframes to CSS3 @keyframes, as demonstrated with Stylie: http://jeremyckahn.github.com/stylie/ http://jeremyckahn.github.com/stylie/
- sasanrose 14y agohtpp://momentjs.com A 5.5kb javascript date library for parsing, validating, manipulating, and formatting dates
- dotborg 14y agoDojo Toolkit, amazing build system
- xiaoma 14y agoI love underscore. It's basically the first thing I add on any project if I'm not using coffee script. Life is too short for programming everything from the ground up.
- trungonnews 14y agoYui3 over jQuery any day.
- olegp 14y agoShameless plug here but I'd say Common Node is pretty good: https://github.com/olegp/common-node https://github.com/olegp/common-node - it lets you write your server using a synchronous style while retaining the low memory usage and quick start up speed of Node.js. For example https://starthq.com https://starthq.com is using about 35MB of RAM and is easy to debug despite some pretty complex business logic around generating site thumbnails.
- franze 14y agobox2d-jquery, (note: i mashed, hacked'n'slashed it myself) when it's done it will be an html/dom based (physics) game engine (then it might even be useful), now the feedback i get is just:cool
- jesusabdullah 14y agoPersonally, I think https://github.com/kripken/emscripten/wiki https://github.com/kripken/emscripten/wiki is mind-blowingly amazing. Check out the demos for sure.
- AdrianRossouw 14y agodid you see they compiled QT against emscripten recently. That's pretty insane if you ask me. Now they just need to compile KHTML too, so it's webkit all the way down. [1] http://badassjs.com/post/43158184752/qt-gui-toolkit-ported-to-javascript-via-emscripten http://badassjs.com/post/43158184752/qt-gui-toolkit-ported-t...
- jpatte 14y agoKnockout (http://knockoutjs.com/ http://knockoutjs.com/) definitely rocked my world. Forget about manipulating the DOM with code (using jQuery or anything): now you have a nice separation between your UI (defined declaratively) and your business logic. Just change some observable values and voila, your UI is updated. I strongly recommend trying the site's tutorial: http://learn.knockoutjs.com http://learn.knockoutjs.com Also if you like Backbone.js, don't miss Knockback.js (http://kmalakoff.github.com/knockback/ http://kmalakoff.github.com/knockback/). Now you have observable (view)models and collections. Definitely cool.
- logn 14y agoNot a JS lib but for JS devs CouchDB/CouchApp rocks. Fully JS webapps with no db/app server distinction. Why does no one care about it anymore? Add BigCouch for scalability.
- jgalt212 14y agoI like sweetjs which brings syntax macros to JavaScript. It hasn't got much traction yet, but I'm convinced someone will do something neat with it. http://sweetjs.org/ http://sweetjs.org/ An obvious use could be as a library building tool. i.e. All the macros could be restricted to the internal methods used to construct the library DSL. All the public methods could look like standard js, and the library users would be none the wiser to the magic used internally to make the library construction more efficient.
- Devlin_Donnelly 14y agoI think impress.js is pretty cool. http://bartaz.github.com/impress.js/ http://bartaz.github.com/impress.js/