_add-to-unscopables.js 292 B

1234567
  1. // 22.1.3.31 Array.prototype[@@unscopables]
  2. var UNSCOPABLES = require('./_wks')('unscopables')
  3. , ArrayProto = Array.prototype;
  4. if(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {});
  5. module.exports = function(key){
  6. ArrayProto[UNSCOPABLES][key] = true;
  7. };