Urara-Blog/node_modules/.pnpm-store/v3/files/14/553e84c9f6031c1c6817bfb67d64d73e47b2bfd0cb0fe8e645860cce598349cccef8aed1f26aea06eade61fb0d6de7f2a8bfd284c650d886334fa5a9bd8b09
2022-08-14 01:14:53 +08:00

18 lines
486 B
Text

var baseCreate = require('./_baseCreate'),
getPrototype = require('./_getPrototype'),
isPrototype = require('./_isPrototype');
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
module.exports = initCloneObject;