Skip to content

Commit 2ebca4d

Browse files
authored
chore: mixed spaces and indentation
1 parent 1c6e2a2 commit 2ebca4d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ function predicate( v ) {
463463
}
464464

465465
var Float64ArrayFE = fixedEndianFactory( 'float64' );
466-
466+
467467
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0 ] );
468468

469469
var out = arr.filter( predicate );
@@ -478,25 +478,25 @@ var v = out.get( 0 );
478478
v = out.get( 1 );
479479
// return 4.0
480480
```
481-
481+
482482
The `predicate` function is provided three arguments:
483483

484484
- **value**: current array element.
485485
- **index**: current array element index.
486486
- **arr**: the array on which this method was called.
487487

488488
To set the function execution context, provide a `thisArg`.
489-
489+
490490
```javascript
491491
function predicate( v, i ) {
492492
this.count += 1;
493493
return ( v % 2 === 0 );
494494
}
495-
495+
496496
var context = {
497497
'count': 0
498498
};
499-
499+
500500
var Float64ArrayFE = fixedEndianFactory( 'float64' );
501501

502502
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0 ] );
@@ -510,7 +510,7 @@ var len = out.length;
510510
var count = context.count;
511511
// returns 4
512512
```
513-
513+
514514
<a name="method-find-last-index"></a>
515515

516516
#### TypedArray.prototype.findLastIndex( predicate\[, thisArg] )
@@ -521,9 +521,9 @@ Returns the index of the last element in an array for which a predicate function
521521
function predicate( v ) {
522522
return v % 2 !== 0;
523523
}
524-
524+
525525
var Float64ArrayFE = fixedEndianFactory( 'float64' );
526-
526+
527527
var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 2.0 ] );
528528

529529
var out = arr.findLastIndex( predicate );

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -626,22 +626,22 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
626626
var out;
627627
var i;
628628
var v;
629-
if ( !isTypedArray( this ) ) {
629+
if ( !isTypedArray( this ) ) {
630630
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
631631
}
632632
if ( !isFunction( predicate ) ) {
633633
throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );
634634
}
635635
buf = this._buffer;
636-
out = [];
636+
out = [];
637637
for ( i = 0; i < this._length; i++) {
638638
v = buf[ GETTER ]( i*BYTES_PER_ELEMENT, this._isLE );
639639
if ( predicate.call( thisArg, v, i, this ) ) {
640640
out.push( v );
641641
}
642642
}
643643
return new this.constructor( flag2byteOrder( this._isLE ), out );
644-
});
644+
});
645645

646646
/**
647647
* Returns the index of the last element in an array for which a predicate function returns a truthy value.
@@ -659,14 +659,14 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
659659
var buf;
660660
var len;
661661
var i;
662-
if ( !isTypedArray( this ) ) {
662+
if ( !isTypedArray( this ) ) {
663663
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
664664
}
665665
if ( !isFunction( predicate ) ) {
666666
throw new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );
667667
}
668668
buf = this._buffer;
669-
len = this._length;
669+
len = this._length;
670670
for ( i = len - 1; i >= 0; i-- ) {
671671
if ( predicate.call( thisArg, buf[ GETTER ]( i * BYTES_PER_ELEMENT, this._isLE ), i, this ) ) {
672672
return i;

0 commit comments

Comments
 (0)