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

21 lines
498 B
JavaScript

define([], function() {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/**
* 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];
};
}
return baseProperty;
});