3 ms·
Quick Summary: Underscore provides all the functional programming goodies that you would expect with Prototype.js or Ruby, but without extending any core javasc
by jashkenas 17y ago
Quick Summary:
Underscore provides all the functional programming goodies that you would expect with Prototype.js or Ruby, but without extending any core javascript objects, so it can fit hand-in-hand with jQuery. In Javascript 1.6 compliant browsers, it delegates to the native versions of functions, so you can have your "map()" and run run it at native speed where available. The production version compresses to 4k, so there's not much overhead in adding it to a page.
Blog Announcement: http://www.documentcloud.org/blog/2009/10/28/underscore-dot-js/ http://www.documentcloud.org/blog/2009/10/28/underscore-dot-...
Git Repo:
http://github.com/documentcloud/underscore http://github.com/documentcloud/underscore
Test and Benchmark Suite:
http://documentcloud.github.com/underscore/test/test.html http://documentcloud.github.com/underscore/test/test.html
- aristus 17y agoAwesome stuff but binding your library to _ (underscore) is unfortunate. That character is traditionally reserved for the gettext / i18n / gimme-a-string-in-human-language-X function. <h1>_('WELCOME_USER', user.firstName)</h1> <p>_('WELCOME_INTRO_TEXT')</p> etc...