mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
20 lines
483 B
JavaScript
20 lines
483 B
JavaScript
define(['./isObject'], function(isObject) {
|
|
|
|
/** Built-in value references. */
|
|
var objectCreate = Object.create;
|
|
|
|
/**
|
|
* The base implementation of `_.create` without support for assigning
|
|
* properties to the created object.
|
|
*
|
|
* @private
|
|
* @param {Object} prototype The object to inherit from.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function baseCreate(proto) {
|
|
return isObject(proto) ? objectCreate(proto) : {};
|
|
}
|
|
|
|
return baseCreate;
|
|
});
|