_.property

property_.property(key) Returns a function that will itself return the key property of any passed-in object. var stooge = {name: 'moe'}; 'moe' === _.property('name')(stooge); => true

_.clone

clone_.clone(object) Create a shallow-copied clone of the provided plain object. Any nested objects or arrays will be copied by reference, not duplicated. _.clone({name: 'moe'}); => {name: 'moe'};

_.isNaN

isNaN_.isNaN(object) Returns true if object is NaN. Note: this is not the same as the native isNaN function, which will also return true for many other not-number values, such as undefined. _.isNaN(NaN); => true isNaN(undefined); => true _.isNaN(undefined); => false

_.isEqual

isEqual_.isEqual(object, other) Performs an optimized deep comparison between the two objects, to determine if they should be considered equal. var stooge = {name: 'moe', luckyNumbers: [13, 27, 34]}; var clone = {name: 'moe', luckyNumbers: [13, 27, 34]}; stooge == clone; => false _.isEqual(stooge, clone); => true

_.isFunction

isFunction_.isFunction(object) Returns true if object is a Function. _.isFunction(alert); => true

_.map

map_.map(list, iteratee, [context]) Alias: collect Produces a new array of values by mapping each value in list through a transformation function (iteratee). The iteratee is passed three arguments: the value, then the index (or key) of the iteration, and finally a reference to the entire list. _.map([1, 2, 3], function(num){ return num * 3; }); => [3, 6, 9] _.map({one: 1, two: 2, three: 3}, function(num, key){ return num * 3; }); => [3, 6, 9] _.map([[1, 2], [3, 4]], _.first); => [1

_.size

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

_.isString

isString_.isString(object) Returns true if object is a String. _.isString("moe"); => true

_.bindAll

bindAll_.bindAll(object, *methodNames) Binds a number of methods on the object, specified by methodNames, to be run in the context of that object whenever they are invoked. Very handy for binding functions that are going to be used as event handlers, which would otherwise be invoked with a fairly useless this. methodNames are required. var buttonView = { label : 'underscore', onClick: function(){ alert('clicked: ' + this.label); }, onHover: function(){ console.log('hovering: ' + this

_.chain

chain_.chain(obj) Returns a wrapped object. Calling methods on this object will continue to return wrapped objects until value is called. var stooges = [{name: 'curly', age: 25}, {name: 'moe', age: 21}, {name: 'larry', age: 23}]; var youngest = _.chain(stooges) .sortBy(function(stooge){ return stooge.age; }) .map(function(stooge){ return stooge.name + ' is ' + stooge.age; }) .first() .value(); => "moe is 21"