Skip to content

Commit 55fc217

Browse files
docs: type method documentation
1 parent ed8bd4b commit 55fc217

File tree

1 file changed

+32
-0
lines changed
  • lib/node_modules/@stdlib/array/fixed-endian-factory

1 file changed

+32
-0
lines changed

lib/node_modules/@stdlib/array/fixed-endian-factory/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,38 @@ var idx = arr.indexOf( 5.0 );
515515
// returns -1
516516
```
517517

518+
<a name="method-includes"></a>
519+
520+
#### TypedArrayFE.prototype.includes( searchElement\[, fromIndex] )
521+
522+
Returns `true` if element can be found.
523+
524+
```javascript
525+
var Float64ArrayFE = fixedEndianFactory( 'float64' );
526+
527+
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 2.0 ] );
528+
529+
var idx = arr.includes( 2.0 );
530+
// returns true
531+
532+
idx = arr.includes( 2.0, 2 );
533+
// returns true
534+
535+
idx = arr.includes( 2.0, -4 );
536+
// returns true
537+
```
538+
539+
If `searchElement` is not present in the array, the method returns `false`.
540+
541+
```javascript
542+
var Float64ArrayFE = fixedEndianFactory( 'float64' );
543+
544+
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 2.0 ] );
545+
546+
var idx = arr.includes( 5.0 );
547+
// returns false
548+
```
549+
518550
<a name="method-map"></a>
519551

520552
#### TypedArray.prototype.map( callbackFn\[, thisArg] )

0 commit comments

Comments
 (0)