_object-sap.js 370 B

12345678910
  1. // most Object methods by ES6 should accept primitives
  2. var $export = require('./_export');
  3. var core = require('./_core');
  4. var fails = require('./_fails');
  5. module.exports = function (KEY, exec) {
  6. var fn = (core.Object || {})[KEY] || Object[KEY];
  7. var exp = {};
  8. exp[KEY] = exec(fn);
  9. $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
  10. };