2015-01-08 00:37:01 -08:00
|
|
|
define([], function() {
|
|
|
|
|
|
|
|
|
|
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
|
|
|
|
var undefined;
|
|
|
|
|
|
|
|
|
|
/**
|
2015-12-16 17:49:35 -08:00
|
|
|
* The base implementation of `_.property` without support for deep paths.
|
2015-01-08 00:37:01 -08:00
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
* @param {string} key The key of the property to get.
|
2016-05-07 11:49:46 -07:00
|
|
|
* @returns {Function} Returns the new accessor function.
|
2015-01-08 00:37:01 -08:00
|
|
|
*/
|
|
|
|
|
function baseProperty(key) {
|
|
|
|
|
return function(object) {
|
|
|
|
|
return object == null ? undefined : object[key];
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return baseProperty;
|
|
|
|
|
});
|