core-js
Version:
Standard library
11 lines (9 loc) • 491 B
JavaScript
;
var arrayFind = require('../internals/array-methods')(5);
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
var aTypedArray = ArrayBufferViewCore.aTypedArray;
// `%TypedArray%.prototype.find` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
ArrayBufferViewCore.exportProto('find', function find(predicate /* , thisArg */) {
return arrayFind(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});