项目原始demo,不改动
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.
 
 
 
 

19 rindas
486 B

  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;