8
0

_baseCreate.js 450 B

123456789101112131415161718
  1. import isObject from './isObject';
  2. /** Built-in value references. */
  3. var objectCreate = Object.create;
  4. /**
  5. * The base implementation of `_.create` without support for assigning
  6. * properties to the created object.
  7. *
  8. * @private
  9. * @param {Object} prototype The object to inherit from.
  10. * @returns {Object} Returns the new object.
  11. */
  12. function baseCreate(proto) {
  13. return isObject(proto) ? objectCreate(proto) : {};
  14. }
  15. export default baseCreate;