Portions of Underscore are inspired by or borrowed from Oliver Steele's Functional, Prototype.js and John Resig's Micro-Templating.
Functional programming support is added, but without extending any of the built-in JavaScript objects.
Underscore provides 60-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, JavaScript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf.
Ports of Underscore.js are available for:
PHP
Python
Perl
What's New in This Release: [ read full changelog ]
· Added _.findWhere, for finding the first element in a list that matches a particular set of keys and values.
· Added _.partial, for partially applying a function without changing its dynamic reference to this.
· Simplified bind by removing some edge cases involving constructor functions. In short: don't _.bind your constructors.
· A minor optimization to invoke.
· Fix bug in the minified version due to the minifier incorrectly optimizing-away isFunction.