_.noConflict

noConflict_.noConflict() Give control of the _ variable back to its previous owner. Returns a reference to the Underscore object. var underscore = _.noConflict();

_.compact

compact_.compact(array) Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", undefined and NaN are all falsy. _.compact([0, 1, false, 2, '', 3]); => [1, 2, 3]

_.debounce

debounce_.debounce(function, wait, [immediate]) Creates and returns a new debounced version of the passed function which will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked. Useful for implementing behavior that should only happen after the input has stopped arriving. For example: rendering a preview of a Markdown comment, recalculating a layout after the window has stopped being resized, and so on. At the end of the wait interval, the f

_.range

range_.range([start], stop, [step]) A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted, defaults to 0; step defaults to 1. Returns a list of integers from start (inclusive) to stop (exclusive), incremented (or decremented) by step, exclusive. Note that ranges that stop before they start are considered to be zero-length instead of negative â if you'd like a negative range, use a negative step. _.range(10); => [0, 1, 2, 3, 4, 5, 6,

_.mixin

mixin_.mixin(object) Allows you to extend Underscore with your own utility functions. Pass a hash of {name: function} definitions to have your functions added to the Underscore object, as well as the OOP wrapper. _.mixin({ capitalize: function(string) { return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase(); } }); _("fabio").capitalize(); => "Fabio"

_.isError

isError_.isError(object) Returns true if object inherits from an Error. try { throw new TypeError("Example"); } catch (o_O) { _.isError(o_O); } => true

_.unzip

unzip_.unzip(array) The opposite of zip. Given an array of arrays, returns a series of new arrays, the first of which contains all of the first elements in the input arrays, the second of which contains all of the second elements, and so on. _.unzip([["moe", 30, true], ["larry", 40, false], ["curly", 50, false]]); => [['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]]

_.isArguments

isArguments_.isArguments(object) Returns true if object is an Arguments object. (function(){ return _.isArguments(arguments); })(1, 2, 3); => true _.isArguments([1,2,3]); => false

_.initial

initial_.initial(array, [n]) Returns everything but the last entry of the array. Especially useful on the arguments object. Pass n to exclude the last n elements from the result. _.initial([5, 4, 3, 2, 1]); => [5, 4, 3, 2]

_.escape

escape_.escape(string) Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters. _.escape('Curly, Larry & Moe'); => "Curly, Larry &amp; Moe"