Files
lodash/identity.js
2017-01-10 01:46:24 -08:00

20 lines
342 B
JavaScript

/**
* This method returns the first argument it receives.
*
* @since 0.1.0
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* const object = { 'a': 1 };
*
* console.log(identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
export default identity;