Files
lodash/utility/identity.js
John-David Dalton 9b7c4d6761 Bump to v3.0.0.
2015-05-19 22:25:55 -07:00

23 lines
407 B
JavaScript

define([], function() {
/**
* This method returns the first argument provided to it.
*
* @static
* @memberOf _
* @category Utility
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
* _.identity(object) === object;
* // => true
*/
function identity(value) {
return value;
}
return identity;
});