Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 26, 2024
1 parent 94dcfd5 commit ff0085b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ A total of 6 people contributed to this release. Thank you to the following cont

<details>

- [`abb0dc3`](https://github.com/stdlib-js/stdlib/commit/abb0dc38783210623e67f19a5bb95b3998f75ff7) - **docs:** update examples and descriptions _(by Athan Reines)_
- [`95d0bbc`](https://github.com/stdlib-js/stdlib/commit/95d0bbc4b76c57dba4b4edd343dcd046490d4a51) - **bench:** test for primitive value _(by Athan Reines)_
- [`c712a8e`](https://github.com/stdlib-js/stdlib/commit/c712a8ec07db672a01355ddfca2192be25fe85ca) - **feat:** add `array/base/broadcasted-ternary4d` [(#3232)](https://github.com/stdlib-js/stdlib/pull/3232) _(by Vinit Pandit, Athan Reines)_
- [`28db4f2`](https://github.com/stdlib-js/stdlib/commit/28db4f2869749f6a6d6f7ae6476bd27f65052e96) - **feat:** add `array/base/mskunary4d` [(#3208)](https://github.com/stdlib-js/stdlib/pull/3208) _(by Abhijit, Athan Reines)_
Expand Down
11 changes: 10 additions & 1 deletion fixed-endian-factory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ Returns an array element located at integer position (index) `i`, with support f
var Float64ArrayFE = fixedEndianFactory( 'float64' );

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

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

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

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

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

var bool = arr.every( isNegative );
// returns true
```

The invoked function is provided three arguments:
The `predicate` function is provided three arguments:

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

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

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

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

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

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

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

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

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

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

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

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

var str = arr.toString();
// returns '1,2,3'
Expand Down
2 changes: 1 addition & 1 deletion fixed-endian-factory/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
* @memberof TypedArray.prototype
* @type {Function}
* @param {Function} predicate - predicate function
* @param {*} [thisArg] - function invocation context
* @param {*} [thisArg] - predicate function execution context
* @throws {TypeError} `this` must be a typed array instance
* @throws {TypeError} first argument must be a function
* @returns {boolean} boolean indicating whether all elements pass a test
Expand Down

0 comments on commit ff0085b

Please sign in to comment.