Files
lodash/internal/baseProperty.js
John-David Dalton 5379c1996b Bump to v3.0.0.
2015-01-25 13:44:01 -08:00

15 lines
358 B
JavaScript

/**
* The base implementation of `_.property` which does not coerce `key` to a string.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
export default baseProperty;