Files
lodash/_baseProperty.js
2017-01-06 15:41:39 -08:00

13 lines
333 B
JavaScript

/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return object => object == null ? undefined : object[key];
}
export default baseProperty;