This commit is contained in:
author
2025-11-08 21:00:06 +08:00
parent 95a4182500
commit fc176f1b7d
1793 changed files with 2099698 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
var isObject = require('../lang/isObject');
/**
* 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.
*/
var baseCreate = (function() {
function object() {}
return function(prototype) {
if (isObject(prototype)) {
object.prototype = prototype;
var result = new object;
object.prototype = undefined;
}
return result || {};
};
}());
module.exports = baseCreate;