项目原始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.
 
 
 
 

26 rindas
633 B

  1. 'use strict';
  2. var ES2016 = require('./es2016');
  3. var assign = require('./helpers/assign');
  4. var ES2017 = assign(assign({}, ES2016), {
  5. ToIndex: function ToIndex(value) {
  6. if (typeof value === 'undefined') {
  7. return 0;
  8. }
  9. var integerIndex = this.ToInteger(value);
  10. if (integerIndex < 0) {
  11. throw new RangeError('index must be >= 0');
  12. }
  13. var index = this.ToLength(integerIndex);
  14. if (!this.SameValueZero(integerIndex, index)) {
  15. throw new RangeError('index must be >= 0 and < 2 ** 53 - 1');
  16. }
  17. return index;
  18. }
  19. });
  20. delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties
  21. module.exports = ES2017;