Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_initCloneObject.js 486B

123456789101112131415161718
  1. var baseCreate = require('./_baseCreate'),
  2. getPrototype = require('./_getPrototype'),
  3. isPrototype = require('./_isPrototype');
  4. /**
  5. * Initializes an object clone.
  6. *
  7. * @private
  8. * @param {Object} object The object to clone.
  9. * @returns {Object} Returns the initialized clone.
  10. */
  11. function initCloneObject(object) {
  12. return (typeof object.constructor == 'function' && !isPrototype(object))
  13. ? baseCreate(getPrototype(object))
  14. : {};
  15. }
  16. module.exports = initCloneObject;