mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
12
.internal/baseProperty.js
Normal file
12
.internal/baseProperty.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* 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;
|
||||
Reference in New Issue
Block a user