Skip to content

Commit bb4707c

Browse files
committed
Auto-generated commit
1 parent 2411529 commit bb4707c

22 files changed

+2455
-237
lines changed

Diff for: CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

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

2526
</section>
@@ -474,6 +475,28 @@ This release closes the following issue:
474475

475476
<!-- /.package -->
476477

478+
<section class="package" id="array-little-endian-factory-unreleased">
479+
480+
#### [@stdlib/array/little-endian-factory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/little-endian-factory)
481+
482+
<details>
483+
484+
<section class="features">
485+
486+
##### Features
487+
488+
- [`d7b8ba6`](https://github.com/stdlib-js/stdlib/commit/d7b8ba61588822a9fed7f49a8fe92823b3e4be7a) - add `array/little-endian-factory`
489+
490+
</section>
491+
492+
<!-- /.features -->
493+
494+
</details>
495+
496+
</section>
497+
498+
<!-- /.package -->
499+
477500
<section class="package" id="array-little-endian-float64-unreleased">
478501

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

537560
<details>
538561

562+
- [`bffda37`](https://github.com/stdlib-js/stdlib/commit/bffda37bf1104bc6e62776ee811c76873edf5461) - **refactor:** use `array/little-endian-factory` _(by Athan Reines)_
563+
- [`5a2c12b`](https://github.com/stdlib-js/stdlib/commit/5a2c12bd3973e3b3a6f5e971ecac17c391570e60) - **feat:** add `Float64ArrayFE` and `Float64ArrayLE` to namespace _(by Athan Reines)_
564+
- [`77794fd`](https://github.com/stdlib-js/stdlib/commit/77794fd44350d8cd242cff9f23258382c5ad3cd2) - **docs:** fix missing private annotation _(by Athan Reines)_
565+
- [`d7b8ba6`](https://github.com/stdlib-js/stdlib/commit/d7b8ba61588822a9fed7f49a8fe92823b3e4be7a) - **feat:** add `array/little-endian-factory` _(by Athan Reines)_
566+
- [`b9f3b77`](https://github.com/stdlib-js/stdlib/commit/b9f3b776e5f3d426629b77206b682836fe6b390f) - **refactor:** reduce string literals _(by Athan Reines)_
539567
- [`17fa3d2`](https://github.com/stdlib-js/stdlib/commit/17fa3d277b28d85634444424f2af75edf60ab030) - **docs:** fix example _(by Athan Reines)_
540568
- [`7d9b31b`](https://github.com/stdlib-js/stdlib/commit/7d9b31bcaf049f263228d7d5c020bb24c408e6d7) - **refactor:** use `array/fixed-endian-factory` _(by Athan Reines)_
541569
- [`a3a04e3`](https://github.com/stdlib-js/stdlib/commit/a3a04e32057b878529b86180e38ed3ae383c34ef) - **feat:** add `array/fixed-endian-factory` _(by Athan Reines)_

Diff for: fixed-endian-factory/lib/main.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,12 @@ var DTYPE2GET = {
6767
'uint32': 'getUint32',
6868
'uint16': 'getUint16'
6969
};
70-
var DTYPE2ARTICLE = {
71-
'float64': 'a',
72-
'float32': 'a',
73-
'int32': 'an',
74-
'int16': 'an',
75-
'uint32': 'a',
76-
'uint16': 'a'
70+
var CHAR2ARTICLE = {
71+
'c': 'a',
72+
'f': 'a',
73+
'i': 'an',
74+
'u': 'a',
75+
'b': 'a'
7776
};
7877
var isDataType = contains( DTYPES );
7978

@@ -367,7 +366,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
367366
throw new TypeError( 'invalid invocation. `this` context must be a constructor.' );
368367
}
369368
if ( !isTypedArrayConstructor( this ) ) {
370-
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
369+
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
371370
}
372371
order = byteOrder( endianness );
373372
if ( order === null || !isByteOrder( order ) ) {
@@ -445,7 +444,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
445444
throw new TypeError( 'invalid invocation. `this` context must be a constructor.' );
446445
}
447446
if ( !isTypedArrayConstructor( this ) ) {
448-
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
447+
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
449448
}
450449
order = byteOrder( endianness );
451450
if ( order === null || !isByteOrder( order ) ) {
@@ -522,7 +521,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
522521
*/
523522
setReadOnly( TypedArray.prototype, 'get', function get( idx ) {
524523
if ( !isTypedArray( this ) ) {
525-
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
524+
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
526525
}
527526
if ( !isNonNegativeInteger( idx ) ) {
528527
throw new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );
@@ -591,7 +590,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
591590
var i;
592591
var j;
593592
if ( !isTypedArray( this ) ) {
594-
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
593+
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
595594
}
596595
buf = this._buffer;
597596
if ( arguments.length > 1 ) {
@@ -656,7 +655,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli
656655
var buf;
657656
var i;
658657
if ( !isTypedArray( this ) ) {
659-
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', DTYPE2ARTICLE[ dtype ], CTOR_NAME ) );
658+
throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) );
660659
}
661660
out = [];
662661
buf = this._buffer;

Diff for: lib/index.js

+36
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,24 @@ setReadOnly( ns, 'filled', require( './../filled' ) );
229229
*/
230230
setReadOnly( ns, 'filledBy', require( './../filled-by' ) );
231231

232+
/**
233+
* @name fixedEndianFactory
234+
* @memberof ns
235+
* @readonly
236+
* @constructor
237+
* @see {@link module:@stdlib/array/fixed-endian-factory}
238+
*/
239+
setReadOnly( ns, 'fixedEndianFactory', require( './../fixed-endian-factory' ) );
240+
241+
/**
242+
* @name Float64ArrayFE
243+
* @memberof ns
244+
* @readonly
245+
* @constructor
246+
* @see {@link module:@stdlib/array/fixed-endian-float64}
247+
*/
248+
setReadOnly( ns, 'Float64ArrayFE', require( './../fixed-endian-float64' ) );
249+
232250
/**
233251
* @name Float32Array
234252
* @memberof ns
@@ -337,6 +355,24 @@ setReadOnly( ns, 'Int32Array', require( './../int32' ) );
337355
*/
338356
setReadOnly( ns, 'linspace', require( './../linspace' ) );
339357

358+
/**
359+
* @name littleEndianFactory
360+
* @memberof ns
361+
* @readonly
362+
* @constructor
363+
* @see {@link module:@stdlib/array/little-endian-factory}
364+
*/
365+
setReadOnly( ns, 'littleEndianFactory', require( './../little-endian-factory' ) );
366+
367+
/**
368+
* @name Float64ArrayLE
369+
* @memberof ns
370+
* @readonly
371+
* @constructor
372+
* @see {@link module:@stdlib/array/little-endian-float64}
373+
*/
374+
setReadOnly( ns, 'Float64ArrayLE', require( './../little-endian-float64' ) );
375+
340376
/**
341377
* @name logspace
342378
* @memberof ns

0 commit comments

Comments
 (0)