blob: 5a13e64a5266d7a6e155fa8c42129a675de8dda2 [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001var baseCreate = require('./_baseCreate'),
2 getPrototype = require('./_getPrototype'),
3 isPrototype = require('./_isPrototype');
4
5/**
6 * Initializes an object clone.
7 *
8 * @private
9 * @param {Object} object The object to clone.
10 * @returns {Object} Returns the initialized clone.
11 */
12function initCloneObject(object) {
13 return (typeof object.constructor == 'function' && !isPrototype(object))
14 ? baseCreate(getPrototype(object))
15 : {};
16}
17
18module.exports = initCloneObject;