1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-26 10:17:48 +00:00
setup-python/node_modules/lodash/_initCloneObject.js
Danny McCormick 39c08a0eaa Initial pass
2019-06-26 21:12:00 -04:00

18 lines
486 B
JavaScript

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;