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 Sep 25, 2024
1 parent 2411529 commit bb4707c
Show file tree
Hide file tree
Showing 22 changed files with 2,455 additions and 237 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

##### Features

- [`5a2c12b`](https://github.com/stdlib-js/stdlib/commit/5a2c12bd3973e3b3a6f5e971ecac17c391570e60) - add `Float64ArrayFE` and `Float64ArrayLE` to namespace
- [`444e453`](https://github.com/stdlib-js/stdlib/commit/444e45363e751ab85736bc97b642520c3e5db301) - add `byteOrders` to namespace

</section>
Expand Down Expand Up @@ -474,6 +475,28 @@ This release closes the following issue:

<!-- /.package -->

<section class="package" id="array-little-endian-factory-unreleased">

#### [@stdlib/array/little-endian-factory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/little-endian-factory)

<details>

<section class="features">

##### Features

- [`d7b8ba6`](https://github.com/stdlib-js/stdlib/commit/d7b8ba61588822a9fed7f49a8fe92823b3e4be7a) - add `array/little-endian-factory`

</section>

<!-- /.features -->

</details>

</section>

<!-- /.package -->

<section class="package" id="array-little-endian-float64-unreleased">

#### [@stdlib/array/little-endian-float64](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/little-endian-float64)
Expand Down Expand Up @@ -536,6 +559,11 @@ A total of 7 people contributed to this release. Thank you to the following cont

<details>

- [`bffda37`](https://github.com/stdlib-js/stdlib/commit/bffda37bf1104bc6e62776ee811c76873edf5461) - **refactor:** use `array/little-endian-factory` _(by Athan Reines)_
- [`5a2c12b`](https://github.com/stdlib-js/stdlib/commit/5a2c12bd3973e3b3a6f5e971ecac17c391570e60) - **feat:** add `Float64ArrayFE` and `Float64ArrayLE` to namespace _(by Athan Reines)_
- [`77794fd`](https://github.com/stdlib-js/stdlib/commit/77794fd44350d8cd242cff9f23258382c5ad3cd2) - **docs:** fix missing private annotation _(by Athan Reines)_
- [`d7b8ba6`](https://github.com/stdlib-js/stdlib/commit/d7b8ba61588822a9fed7f49a8fe92823b3e4be7a) - **feat:** add `array/little-endian-factory` _(by Athan Reines)_
- [`b9f3b77`](https://github.com/stdlib-js/stdlib/commit/b9f3b776e5f3d426629b77206b682836fe6b390f) - **refactor:** reduce string literals _(by Athan Reines)_
- [`17fa3d2`](https://github.com/stdlib-js/stdlib/commit/17fa3d277b28d85634444424f2af75edf60ab030) - **docs:** fix example _(by Athan Reines)_
- [`7d9b31b`](https://github.com/stdlib-js/stdlib/commit/7d9b31bcaf049f263228d7d5c020bb24c408e6d7) - **refactor:** use `array/fixed-endian-factory` _(by Athan Reines)_
- [`a3a04e3`](https://github.com/stdlib-js/stdlib/commit/a3a04e32057b878529b86180e38ed3ae383c34ef) - **feat:** add `array/fixed-endian-factory` _(by Athan Reines)_
Expand Down
23 changes: 11 additions & 12 deletions fixed-endian-factory/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ var DTYPE2GET = {
'uint32': 'getUint32',
'uint16': 'getUint16'
};
var DTYPE2ARTICLE = {
'float64': 'a',
'float32': 'a',
'int32': 'an',
'int16': 'an',
'uint32': 'a',
'uint16': 'a'
var CHAR2ARTICLE = {
'c': 'a',
'f': 'a',
'i': 'an',
'u': 'a',
'b': 'a'
};
var isDataType = contains( DTYPES );

Expand Down Expand Up @@ -367,7 +366,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
throw new TypeError( 'invalid invocation. `this` context must be a constructor.' );
}
if ( !isTypedArrayConstructor( this ) ) {
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
}
order = byteOrder( endianness );
if ( order === null || !isByteOrder( order ) ) {
Expand Down Expand Up @@ -445,7 +444,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
throw new TypeError( 'invalid invocation. `this` context must be a constructor.' );
}
if ( !isTypedArrayConstructor( this ) ) {
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
}
order = byteOrder( endianness );
if ( order === null || !isByteOrder( order ) ) {
Expand Down Expand Up @@ -522,7 +521,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
*/
setReadOnly( TypedArray.prototype, 'get', function get( idx ) {
if ( !isTypedArray( this ) ) {
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
}
if ( !isNonNegativeInteger( idx ) ) {
throw new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );
Expand Down Expand Up @@ -591,7 +590,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
var i;
var j;
if ( !isTypedArray( this ) ) {
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
}
buf = this._buffer;
if ( arguments.length > 1 ) {
Expand Down Expand Up @@ -656,7 +655,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
var buf;
var i;
if ( !isTypedArray( this ) ) {
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
}
out = [];
buf = this._buffer;
Expand Down
36 changes: 36 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,24 @@ setReadOnly( ns, 'filled', require( './../filled' ) );
*/
setReadOnly( ns, 'filledBy', require( './../filled-by' ) );

/**
* @name fixedEndianFactory
* @memberof ns
* @readonly
* @constructor
* @see {@link module:@stdlib/array/fixed-endian-factory}
*/
setReadOnly( ns, 'fixedEndianFactory', require( './../fixed-endian-factory' ) );

/**
* @name Float64ArrayFE
* @memberof ns
* @readonly
* @constructor
* @see {@link module:@stdlib/array/fixed-endian-float64}
*/
setReadOnly( ns, 'Float64ArrayFE', require( './../fixed-endian-float64' ) );

/**
* @name Float32Array
* @memberof ns
Expand Down Expand Up @@ -337,6 +355,24 @@ setReadOnly( ns, 'Int32Array', require( './../int32' ) );
*/
setReadOnly( ns, 'linspace', require( './../linspace' ) );

/**
* @name littleEndianFactory
* @memberof ns
* @readonly
* @constructor
* @see {@link module:@stdlib/array/little-endian-factory}
*/
setReadOnly( ns, 'littleEndianFactory', require( './../little-endian-factory' ) );

/**
* @name Float64ArrayLE
* @memberof ns
* @readonly
* @constructor
* @see {@link module:@stdlib/array/little-endian-float64}
*/
setReadOnly( ns, 'Float64ArrayLE', require( './../little-endian-float64' ) );

/**
* @name logspace
* @memberof ns
Expand Down
Loading

0 comments on commit bb4707c

Please sign in to comment.