Files
lodash/.internal/baseCreate.js
John-David Dalton 70379910f7 Simplify baseCreate.
2017-01-10 21:25:41 -08:00

16 lines
379 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;