d96db6e0a38b072d3ec702cf231344329fb046aa9c49c605ddbe26a29889e741cce0cdf639cbf1d48fa49a156ada91694ebef9f892b544c682ae95084794a5 686 B

1234567891011121314
  1. 'use strict';
  2. var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
  3. var apply = require('../internals/function-apply');
  4. var $lastIndexOf = require('../internals/array-last-index-of');
  5. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  6. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  7. // `%TypedArray%.prototype.lastIndexOf` method
  8. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
  9. exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  10. var length = arguments.length;
  11. return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);
  12. });