Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

esnext.typed-array.at.js 687B

1234567891011121314151617
  1. 'use strict';
  2. var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
  3. var toLength = require('../internals/to-length');
  4. var toInteger = require('../internals/to-integer');
  5. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  6. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  7. // `%TypedArray%.prototype.at` method
  8. // https://github.com/tc39/proposal-relative-indexing-method
  9. exportTypedArrayMethod('at', function at(index) {
  10. var O = aTypedArray(this);
  11. var len = toLength(O.length);
  12. var relativeIndex = toInteger(index);
  13. var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
  14. return (k < 0 || k >= len) ? undefined : O[k];
  15. });