$.object-sap.js 371 B

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