SMASH JSON

D3 3.1 includes support for SMASH, a way to make subset builds of D3. One thing I use D3 a lot for is the XmlHttpRequest support, particularly d3.json(). Most people use JQuery for AJAX, but I like D3’s version, but in either case I don’t want a 100k library just for a wrapper for XHR. Anyway..

$ smash src/start.js src/xhr/*.js src/dsv/*.js src/end.js | uglifyjs -c -m | gzip | wc -c
2276

Just JSON support is only 1464 bytes compressed, but it’s nice to bring in the CSV/TSV parsing. It’s 12k unminimized. Nice way to build a minimal XHR library. Didn’t test that it actually works ;-P