_.omit

omit_.omit(object, *keys) Return a copy of the object, filtered to omit the blacklisted keys (or array of keys). Alternatively accepts a predicate indicating which keys to omit. _.omit({name: 'moe', age: 50, userid: 'moe1'}, 'userid'); => {name: 'moe', age: 50} _.omit({name: 'moe', age: 50, userid: 'moe1'}, function(value, key, object) { return _.isNumber(value); }); => {name: 'moe', userid: 'moe1'}

_.now

now_.now() Returns an integer timestamp for the current time, using the fastest method available in the runtime. Useful for implementing timing/animation functions. _.now(); => 1392066795351

_.partition

partition_.partition(array, predicate) Split array into two arrays: one whose elements all satisfy predicate and one whose elements all do not satisfy predicate. _.partition([0, 1, 2, 3, 4, 5], isOdd); => [[1, 3, 5], [0, 2, 4]]

_.partial

partial_.partial(function, *arguments) Partially apply a function by filling in any number of its arguments, without changing its dynamic this value. A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be pre-filled, but left open to supply at call-time. var subtract = function(a, b) { return b - a; }; sub5 = _.partial(subtract, 5); sub5(20); => 15 // Using a placeholder subFrom20 = _.partial(subtract, _, 20); subFrom20(5); => 15

_.pairs

pairs_.pairs(object) Convert an object into a list of [key, value] pairs. _.pairs({one: 1, two: 2, three: 3}); => [["one", 1], ["two", 2], ["three", 3]]

_.once

once_.once(function) Creates a version of the function that can only be called one time. Repeated calls to the modified function will have no effect, returning the value from the original call. Useful for initialization functions, instead of having to set a boolean flag and then check it later. var initialize = _.once(createApplication); initialize(); initialize(); // Application is only created once.

_.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"

_.max

max_.max(list, [iteratee], [context]) Returns the maximum value in list. If an iteratee function is provided, it will be used on each value to generate the criterion by which the value is ranked. -Infinity is returned if list is empty, so an isEmpty guard may be required. var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: 'curly', age: 60}]; _.max(stooges, function(stooge){ return stooge.age; }); => {name: 'curly', age: 60};

_.noConflict

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

_.noop

noop_.noop() Returns undefined irrespective of the arguments passed to it. Useful as the default for optional callback arguments. obj.initialize = _.noop;