Skip to content

Commit 21225c3

Browse files
authored
Apply suggestions from code review
Signed-off-by: Athan <[email protected]>
1 parent c7e9201 commit 21225c3

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ var idx = arr.indexOf( 5.0 );
519519

520520
#### TypedArrayFE.prototype.includes( searchElement\[, fromIndex] )
521521

522-
Returns `true` if the specified `searchElement` is present in the array.
522+
Returns a boolean indicating whether an array includes a provided value.
523523

524524
```javascript
525525
var Float64ArrayFE = fixedEndianFactory( 'float64' );
@@ -534,16 +534,8 @@ idx = arr.includes( 2.0, 2 );
534534

535535
idx = arr.includes( 2.0, -4 );
536536
// returns true
537-
```
538-
539-
If the specified `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 ] );
545537

546-
var idx = arr.includes( 5.0 );
538+
idx = arr.includes( 5.0 );
547539
// returns false
548540
```
549541

lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,18 +675,19 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
675675
}
676676
return -1;
677677
});
678+
678679
/**
679-
* Returns `true` if the specified `searchElement` is present in the array.
680+
* Returns a boolean indicating whether an array includes a provided value.
680681
*
681682
* @private
682683
* @name includes
683684
* @memberof TypedArray.prototype
684685
* @type {Function}
685-
* @param {*} searchElement - element to search for
686+
* @param {*} searchElement - search element
686687
* @param {integer} [fromIndex=0] - starting index (inclusive)
687688
* @throws {TypeError} `this` must be a typed array instance
688689
* @throws {TypeError} second argument must be an integer
689-
* @returns {boolean} boolean indicating that `searchElement` is found
690+
* @returns {boolean} boolean indicating whether an array includes a provided value
690691
*/
691692
setReadOnly( TypedArray.prototype, 'includes', function includes( searchElement, fromIndex ) {
692693
var buf;

0 commit comments

Comments
 (0)