Ask HN: JavaScript code base to read and learn from
Thanks
Thanks
There are also multiple camps which battle about whether too use semicolons at all and where to place commas that separate the individual parts of `var` statements. I'm not going to take any sides here, since I think that style is something everyone has to decide on their own :)
Now as for the code to read, there's obviously jQuery, but Angular.js is definitely a good read too these days.
https://github.com/angular/angular.js
If you're into parsing (or want to learn about it), there's also Esprima which is a JavaScript Parser written in JavaScript:
https://github.com/ariya/esprima
Taking a look at NPM might give you an idea of another syntax style, since commas are infront of the lines here and there are no semicolons:
https://github.com/npm/npm/tree/master/lib
And last but no least a shameless plug or two!
gbaasm this is a assembler for z80 GameBoy code (which takes assembly files and build a ROM) written by myself, it has a big focus on performance and is another example of lexing / parsing source code.
https://github.com/BonsaiDen/gbasm
For something short and sweet I got a minimal 2D physics engine here. Beware though, if you're new to physics simulation is can be quite hard to figure out what excactly is going on:
http://www.paulirish.com/2010/10-things-i-learned-from-the-j...