项目原始demo,不改动
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i je sklonować, ale nie możesz do niego przepychać zmian lub otwierać zgłoszeń/Pull Requestów.
 
 
 
 

26 wiersze
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;