_object-define.js 387 B

12345678910111213
  1. var dP = require('./_object-dp');
  2. var gOPD = require('./_object-gopd');
  3. var ownKeys = require('./_own-keys');
  4. var toIObject = require('./_to-iobject');
  5. module.exports = function define(target, mixin) {
  6. var keys = ownKeys(toIObject(mixin));
  7. var length = keys.length;
  8. var i = 0;
  9. var key;
  10. while (length > i) dP.f(target, key = keys[i++], gOPD.f(mixin, key));
  11. return target;
  12. };