Skip to content

Commit abb0dc3

Browse files
committed
docs: update examples and descriptions
1 parent 63a0ee0 commit abb0dc3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ Returns an array element located at integer position (index) `i`, with support f
316316
var Float64ArrayFE = fixedEndianFactory( 'float64' );
317317

318318
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0 ] );
319+
// returns <Float64ArrayFE>
319320

320321
var out = arr.at( 0 );
321322
// returns 1.0
@@ -330,6 +331,7 @@ If provided an out-of-bounds index, the method returns `undefined`.
330331
var Float64ArrayFE = fixedEndianFactory( 'float64' );
331332

332333
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0 ] );
334+
// returns <Float64ArrayFE>
333335

334336
var v = arr.at( 100 );
335337
// returns undefined
@@ -352,12 +354,13 @@ function isNegative( v ) {
352354
var Float64ArrayFE = fixedEndianFactory( 'float64' );
353355

354356
var arr = new Float64ArrayFE( 'little-endian', [ -1.0, -2.0, -3.0, -4.0 ] );
357+
// returns <Float64ArrayFE>
355358

356359
var bool = arr.every( isNegative );
357360
// returns true
358361
```
359362

360-
The invoked function is provided three arguments:
363+
The `predicate` function is provided three arguments:
361364

362365
- **value**: current array element.
363366
- **index**: current array element index.
@@ -374,6 +377,7 @@ function isPositive( v, i ) {
374377
var Float64ArrayFE = fixedEndianFactory( 'float64' );
375378

376379
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, -3.0 ] );
380+
// returns <Float64ArrayFE>
377381

378382
var context = {
379383
'count': 0
@@ -400,6 +404,7 @@ function log( v, i ) {
400404
var Float64ArrayFE = fixedEndianFactory( 'float64' );
401405

402406
var arr = new Float64ArrayFE( 'little-endian', 3 );
407+
// returns <Float64ArrayFE>
403408

404409
arr.set( 1.5, 0 );
405410
arr.set( 2.5, 1 );
@@ -430,6 +435,7 @@ function fcn( v, i ) {
430435
var Float64ArrayFE = fixedEndianFactory( 'float64' );
431436

432437
var arr = new Float64ArrayFE( 'little-endian', 3 );
438+
// returns <Float64ArrayFE>
433439

434440
var context = {
435441
'count': 0
@@ -455,6 +461,7 @@ Returns an array element located at a nonnegative integer position (index) `i`.
455461
var Float64ArrayFE = fixedEndianFactory( 'float64' );
456462

457463
var arr = new Float64ArrayFE( 'little-endian', 10 );
464+
// returns <Float64ArrayFE>
458465

459466
// Set the first element:
460467
arr.set( 1.0, 0 );
@@ -470,6 +477,7 @@ If provided an out-of-bounds index, the method returns `undefined`.
470477
var Float64ArrayFE = fixedEndianFactory( 'float64' );
471478

472479
var arr = new Float64ArrayFE( 'little-endian', 10 );
480+
// returns <Float64ArrayFE>
473481

474482
var v = arr.get( 100 );
475483
// returns undefined
@@ -537,6 +545,7 @@ Serializes an array as a string.
537545
var Float64ArrayFE = fixedEndianFactory( 'float64' );
538546

539547
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0 ] );
548+
// returns <Float64ArrayFE>
540549

541550
var str = arr.toString();
542551
// returns '1,2,3'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
545545
* @memberof TypedArray.prototype
546546
* @type {Function}
547547
* @param {Function} predicate - predicate function
548-
* @param {*} [thisArg] - function invocation context
548+
* @param {*} [thisArg] - predicate function execution context
549549
* @throws {TypeError} `this` must be a typed array instance
550550
* @throws {TypeError} first argument must be a function
551551
* @returns {boolean} boolean indicating whether all elements pass a test

0 commit comments

Comments
 (0)