mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
16 lines
377 B
JavaScript
16 lines
377 B
JavaScript
import isObject from '../isObject.js'
|
|
|
|
/**
|
|
* The base implementation of `create` without support for assigning
|
|
* properties to the created object.
|
|
*
|
|
* @private
|
|
* @param {Object} proto The object to inherit from.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function baseCreate(proto) {
|
|
return isObject(proto) ? Object.create(proto) : {}
|
|
}
|
|
|
|
export default baseCreate
|