Files
lodash/identity.js
John-David Dalton c731ef8e1e Bump to v4.13.0.
2016-05-22 19:32:32 -07:00

25 lines
437 B
JavaScript

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