_.unescape

unescape_.unescape(string) The opposite of escape, replaces &, <, >, ", ` and ' with their unescaped counterparts. _.unescape('Curly, Larry & Moe'); => "Curly, Larry & Moe"

_.toArray

toArray_.toArray(list) Creates a real Array from the list (anything that can be iterated over). Useful for transmuting the arguments object. (function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4); => [2, 3, 4]

_.times

times_.times(n, iteratee, [context]) Invokes the given iteratee function n times. Each invocation of iteratee is called with an index argument. Produces an array of the returned values. Note: this example uses the object-oriented syntax. _(3).times(function(n){ genie.grantWishNumber(n); });

_.throttle

throttle_.throttle(function, wait, [options]) Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, will only actually call the original function at most once per every wait milliseconds. Useful for rate-limiting events that occur faster than you can keep up with. By default, throttle will execute the function as soon as you call it for the first time, and, if you call it again any number of times during the wait period, as soon as that period i

_.template

template_.template(templateString, [settings]) Compiles JavaScript templates into functions that can be evaluated for rendering. Useful for rendering complicated bits of HTML from JSON data sources. Template functions can both interpolate values, using <%= ⦠%>, as well as execute arbitrary JavaScript code, with <% ⦠%>. If you wish to interpolate a value, and have it be HTML-escaped, use <%- ⦠%>. When you evaluate a template function, pass in a data object that

_.tap

tap_.tap(object, interceptor) Invokes interceptor with the object, and then returns object. The primary purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain. _.chain([1,2,3,200]) .filter(function(num) { return num % 2 == 0; }) .tap(alert) .map(function(num) { return num * num }) .value(); => // [2, 200] (alerted) => [4, 40000]

_.sortedIndex

sortedIndex_.sortedIndex(list, value, [iteratee], [context]) Uses a binary search to determine the index at which the value should be inserted into the list in order to maintain the list's sorted order. If an iteratee function is provided, it will be used to compute the sort ranking of each value, including the value you pass. The iteratee may also be the string name of the property to sort by (eg. length). _.sortedIndex([10, 20, 30, 40, 50], 35); => 3 var stooges = [{name: 'moe', age:

_.sortBy

sortBy_.sortBy(list, iteratee, [context]) Returns a (stably) sorted copy of list, ranked in ascending order by the results of running each value through iteratee. iteratee may also be the string name of the property to sort by (eg. length). _.sortBy([1, 2, 3, 4, 5, 6], function(num){ return Math.sin(num); }); => [5, 4, 6, 3, 1, 2] var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: 'curly', age: 60}]; _.sortBy(stooges, 'name'); => [{name: 'curly', age: 60}, {name:

_.size

size_.size(list) Return the number of values in the list. _.size({one: 1, two: 2, three: 3}); => 3

_.shuffle

shuffle_.shuffle(list) Returns a shuffled copy of the list, using a version of the Fisher-Yates shuffle. _.shuffle([1, 2, 3, 4, 5, 6]); => [4, 1, 6, 3, 5, 2]