From f734216577d444f098afde5dc6d7fc1a11e164d9 Mon Sep 17 00:00:00 2001 From: sarthakkaushik927 Date: Thu, 29 Oct 2026 10:57:49 +0530 Subject: [PATCH 1/4] feat: add `slice` method to `array/fixed-endian-factory` Closes: https://github.com/stdlib-js/stdlib/issues/3154 Co-Authored-By: Claude Opus 5.5 Signed-off-by: sarthakkaushik927 --- .../array/fixed-endian-factory/README.md | 67 ++++ .../benchmark/benchmark.slice.js | 56 ++++ .../benchmark/benchmark.slice.length.js | 100 ++++++ .../array/fixed-endian-factory/lib/main.js | 69 ++++ .../fixed-endian-factory/test/test.slice.js | 300 ++++++++++++++++++ 5 files changed, 592 insertions(+) create mode 100644 lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.js create mode 100644 lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.length.js create mode 100644 lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/README.md b/lib/node_modules/@stdlib/array/fixed-endian-factory/README.md index c92a71895e80..e923de7f3b14 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/README.md +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/README.md @@ -837,6 +837,73 @@ A few notes: - If a target array cannot accommodate all values (i.e., the length of source array plus `i` exceeds the target array length), the method throws an error. - If provided a typed array which shares an [`ArrayBuffer`][@stdlib/array/buffer] with the target array, the method will intelligently copy the source range to the destination range. + + +#### TypedArrayFE.prototype.slice( \[start\[, end]] ) + +Copies a portion of a typed array to a new typed array. + +```javascript +var Float64ArrayFE = fixedEndianFactory( 'float64' ); + +var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); +// returns + +var out = arr.slice(); +// returns + +var len = out.length; +// returns 5 + +var v = out.get( 0 ); +// returns 1.0 + +v = out.get( len-1 ); +// returns 5.0 +``` + +By default, the method returns a typed array beginning with the first array element. To specify an alternative array index at which to begin, provide a `start` index (inclusive). + +```javascript +var Float64ArrayFE = fixedEndianFactory( 'float64' ); + +var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); +// returns + +var out = arr.slice( 1 ); +// returns + +var len = out.length; +// returns 4 + +var v = out.get( 0 ); +// returns 2.0 + +v = out.get( len-1 ); +// returns 5.0 +``` + +By default, the method returns a typed array which includes all array elements after `start`. To limit the number of array elements after `start`, provide an `end` index (exclusive). + +```javascript +var Float64ArrayFE = fixedEndianFactory( 'float64' ); + +var arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); +// returns + +var out = arr.slice( 1, -2 ); +// returns + +var len = out.length; +// returns 2 + +var v = out.get( 0 ); +// returns 2.0 + +v = out.get( len-1 ); +// returns 3.0 +``` + #### TypedArrayFE.prototype.some( predicate\[, thisArg] ) diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.js new file mode 100644 index 000000000000..cdd5b4a680ee --- /dev/null +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.js @@ -0,0 +1,56 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var factory = require( './../lib' ); + + +// VARIABLES // + +var Float64ArrayFE = factory( 'float64' ); + + +// MAIN // + +bench( format( '%s:slice', pkg ), function benchmark( b ) { + var out; + var arr; + var i; + + arr = new Float64ArrayFE( 'little-endian', [ 1.0, 2.0, 2.0, 1.0 ] ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = arr.slice(); + if ( typeof out !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !( out instanceof Float64ArrayFE ) ) { + b.fail( 'should return a typed array' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.length.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.length.js new file mode 100644 index 000000000000..e26f4258adac --- /dev/null +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/benchmark/benchmark.slice.length.js @@ -0,0 +1,100 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var zeroTo = require( '@stdlib/array/zero-to' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var factory = require( './../lib' ); + + +// VARIABLES // + +var Float64ArrayFE = factory( 'float64' ); + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} len - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( len ) { + var arr = new Float64ArrayFE( 'little-endian', zeroTo( len ) ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = arr.slice(); + if ( typeof out !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !( out instanceof Float64ArrayFE ) ) { + b.fail( 'should return a typed array' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var len; + var min; + var max; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + len = pow( 10, i ); + f = createBenchmark( len ); + bench( format( '%s:slice:len=%d', pkg, len ), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js index 192aa58e47c8..a771ef0aba21 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js @@ -1069,6 +1069,75 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli buf[ SETTER ]( idx*BYTES_PER_ELEMENT, value, this._isLE ); }); + /** + * Copies a portion of a typed array to a new typed array. + * + * @private + * @name slice + * @memberof TypedArray.prototype + * @type {Function} + * @param {integer} [start=0] - starting index (inclusive) + * @param {integer} [end] - ending index (exclusive) + * @throws {TypeError} `this` must be a typed array instance + * @throws {TypeError} first argument must be an integer + * @throws {TypeError} second argument must be an integer + * @returns {TypedArray} typed array + */ + setReadOnly( TypedArray.prototype, 'slice', function slice( start, end ) { + var outlen; + var outbuf; + var out; + var buf; + var len; + var i; + + if ( !isTypedArray( this ) ) { + throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) ); + } + buf = this._buffer; + len = this._length; + if ( arguments.length === 0 ) { + start = 0; + end = len; + } else { + if ( !isInteger( start ) ) { + throw new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) ); + } + if ( start < 0 ) { + start += len; + if ( start < 0 ) { + start = 0; + } + } + if ( arguments.length === 1 ) { + end = len; + } else { + if ( !isInteger( end ) ) { + throw new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) ); + } + if ( end < 0 ) { + end += len; + if ( end < 0 ) { + end = 0; + } + } else if ( end > len ) { + end = len; + } + } + } + if ( start < end ) { + outlen = end - start; + } else { + outlen = 0; + } + out = new this.constructor( flag2byteOrder( this._isLE ), outlen ); + outbuf = out._buffer; // eslint-disable-line no-underscore-dangle + for ( i = 0; i < outlen; i++ ) { + outbuf[ SETTER ]( i*BYTES_PER_ELEMENT, buf[ GETTER ]( (i+start)*BYTES_PER_ELEMENT, this._isLE ), this._isLE ); + } + return out; + }); + /** * Tests whether at least one element in the typed array passes a test implemented by a predicate function. * diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js new file mode 100644 index 000000000000..07fbd31e0654 --- /dev/null +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js @@ -0,0 +1,300 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var hasSameValues = require( '@stdlib/array/base/assert/has-same-values' ); +var hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var isFunction = require( '@stdlib/assert/is-function' ); +var factory = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof factory, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a function', function test( t ) { + var ctor = factory( 'float64' ); + t.strictEqual( isFunction( ctor ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'attached to the prototype of the returned function is a `slice` method', function test( t ) { + var ctor = factory( 'float64' ); + t.strictEqual( hasOwnProp( ctor.prototype, 'slice' ), true, 'returns expected value' ); + t.strictEqual( isFunction( ctor.prototype.slice ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the method throws an error if invoked with a `this` context which is not a typed array instance', function test( t ) { + var values; + var ctor; + var arr; + var i; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + values = [ + '5', + 5, + NaN, + true, + false, + null, + void 0, + {}, + [], + function noop() {} + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + return arr.slice.call( value ); + }; + } +}); + +tape( 'the method throws an error if provided a first argument which is not an integer', function test( t ) { + var values; + var ctor; + var arr; + var i; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + values = [ + '5', + 3.14, + NaN, + true, + false, + null, + void 0, + {}, + [], + function noop() {} + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + return arr.slice( value ); + }; + } +}); + +tape( 'the method throws an error if provided a second argument which is not an integer', function test( t ) { + var values; + var ctor; + var arr; + var i; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + values = [ + '5', + 3.14, + NaN, + true, + false, + null, + void 0, + {}, + [], + function noop() {} + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + return arr.slice( 0, value ); + }; + } +}); + +tape( 'the method returns an empty typed array if operating on an empty typed array', function test( t ) { + var ctor; + var arr; + var out; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian' ); + out = arr.slice(); + + t.strictEqual( out instanceof ctor, true, 'returns expected value' ); + t.strictEqual( out.length, 0, 'returns expected value' ); + t.end(); +}); + +tape( 'if called without arguments, the method returns a typed array containing the same elements as the original array', function test( t ) { + var expected; + var actual; + var ctor; + var arr; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + expected = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + actual = arr.slice(); + + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.notEqual( actual, arr, 'returns a new instance' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if called with one argument, the method returns a typed array containing elements starting from a specified beginning index (inclusive)', function test( t ) { + var expected; + var actual; + var ctor; + var arr; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + expected = new ctor( 'little-endian', [ 2.0, 3.0, 4.0, 5.0 ] ); + actual = arr.slice( 1 ); + + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided two arguments, the method returns a typed array containing elements starting from a specified start index (inclusive) and ending at a specified end index (exclusive)', function test( t ) { + var expected; + var actual; + var ctor; + var arr; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + expected = new ctor( 'little-endian', [ 1.0, 2.0, 3.0 ] ); + actual = arr.slice( 0, 3 ); + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + + expected = new ctor( 'little-endian', [ 2.0, 3.0, 4.0, 5.0 ] ); + actual = arr.slice( 1, 10 ); + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the method resolves negative indices relative to the last element', function test( t ) { + var expected; + var actual; + var ctor; + var arr; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + expected = new ctor( 'little-endian', [ 2.0, 3.0, 4.0 ] ); + actual = arr.slice( -4, -1 ); + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + + expected = new ctor( 'little-endian', [ 1.0, 2.0 ] ); + actual = arr.slice( -10, -3 ); + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'the method returns an empty typed array if a resolved beginning index exceeds a resolved ending index', function test( t ) { + var ctor; + var arr; + var out; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + + out = arr.slice( 3, 1 ); + t.strictEqual( out instanceof ctor, true, 'returns expected value' ); + t.strictEqual( out.length, 0, 'returns expected value' ); + + out = arr.slice( 2, -10 ); + t.strictEqual( out instanceof ctor, true, 'returns expected value' ); + t.strictEqual( out.length, 0, 'returns expected value' ); + + out = arr.slice( 10 ); + t.strictEqual( out instanceof ctor, true, 'returns expected value' ); + t.strictEqual( out.length, 0, 'returns expected value' ); + t.end(); +}); + +tape( 'the method returns a typed array having the same byte order as the original array', function test( t ) { + var expected; + var actual; + var ctor; + var arr; + + ctor = factory( 'float64' ); + arr = new ctor( 'big-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + expected = new ctor( 'big-endian', [ 2.0, 3.0, 4.0 ] ); + actual = arr.slice( 1, 4 ); + + t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); + t.strictEqual( actual.length, expected.length, 'returns expected value' ); + t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); + t.strictEqual( actual._isLE, false, 'returns expected value' ); // eslint-disable-line no-underscore-dangle + t.end(); +}); + +tape( 'the method returns a typed array which does not share memory with the original array', function test( t ) { + var ctor; + var arr; + var out; + + ctor = factory( 'float64' ); + arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); + out = arr.slice(); + + t.notEqual( out.buffer, arr.buffer, 'returns expected value' ); + + out.set( 10.0, 0 ); + t.strictEqual( arr.get( 0 ), 1.0, 'returns expected value' ); + t.strictEqual( out.get( 0 ), 10.0, 'returns expected value' ); + t.end(); +}); From d10194fd97358c817303570ffe12117e0ce4f6a2 Mon Sep 17 00:00:00 2001 From: sarthakkaushik927 Date: Thu, 29 Oct 2026 16:30:21 +0530 Subject: [PATCH 2/4] refactor: copy bytes directly in `slice` Copy the underlying bytes directly instead of copying element-by-element via accessors, and avoid testing private properties. Co-Authored-By: Claude Opus 5.5 Signed-off-by: sarthakkaushik927 --- .../array/fixed-endian-factory/lib/main.js | 24 ++++++++----------- .../fixed-endian-factory/test/test.slice.js | 1 - 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js index a771ef0aba21..09137ad92392 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js @@ -1084,12 +1084,11 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli * @returns {TypedArray} typed array */ setReadOnly( TypedArray.prototype, 'slice', function slice( start, end ) { - var outlen; - var outbuf; - var out; + var nbytes; + var dest; + var src; var buf; var len; - var i; if ( !isTypedArray( this ) ) { throw new TypeError( format( 'invalid invocation. `this` is not %s %s.', CHAR2ARTICLE[ dtype[0] ], CTOR_NAME ) ); @@ -1125,17 +1124,14 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli } } } - if ( start < end ) { - outlen = end - start; - } else { - outlen = 0; - } - out = new this.constructor( flag2byteOrder( this._isLE ), outlen ); - outbuf = out._buffer; // eslint-disable-line no-underscore-dangle - for ( i = 0; i < outlen; i++ ) { - outbuf[ SETTER ]( i*BYTES_PER_ELEMENT, buf[ GETTER ]( (i+start)*BYTES_PER_ELEMENT, this._isLE ), this._isLE ); + if ( start >= end ) { + return new this.constructor( flag2byteOrder( this._isLE ), 0 ); } - return out; + nbytes = ( end-start ) * BYTES_PER_ELEMENT; + src = new Uint8Array( buf.buffer, buf.byteOffset+(start*BYTES_PER_ELEMENT), nbytes ); + dest = new Uint8Array( new ArrayBuffer( nbytes ) ); + dest.set( src ); + return new this.constructor( flag2byteOrder( this._isLE ), dest.buffer ); }); /** diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js index 07fbd31e0654..bc4abbee6867 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/test/test.slice.js @@ -278,7 +278,6 @@ tape( 'the method returns a typed array having the same byte order as the origin t.strictEqual( actual instanceof ctor, true, 'returns expected value' ); t.strictEqual( actual.length, expected.length, 'returns expected value' ); t.strictEqual( hasSameValues( actual, expected ), true, 'returns expected value' ); - t.strictEqual( actual._isLE, false, 'returns expected value' ); // eslint-disable-line no-underscore-dangle t.end(); }); From 4485cc6109a32a11525440578f6658c341027800 Mon Sep 17 00:00:00 2001 From: SARTHAK Date: Thu, 29 Oct 2026 18:32:09 +0000 Subject: [PATCH 3/4] fix: update fixed-endian factory JSDoc tag --- lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js index 09137ad92392..25d3f1936580 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js @@ -226,7 +226,7 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli * Typed array constructor which returns a typed array representing an array of values in a specified byte order. * * @private - * @constructor + * @class * @param {string} endianness - byte order * @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable * @param {NonNegativeInteger} [byteOffset=0] - byte offset From 30b74d0cf3306b7883d32d50d0e6bea65c15f2ce Mon Sep 17 00:00:00 2001 From: SARTHAK Date: Thu, 29 Oct 2026 18:34:05 +0000 Subject: [PATCH 4/4] fix: remove unsupported constructor JSDoc tag --- lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js index 25d3f1936580..2ac8cc03b1b9 100644 --- a/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js +++ b/lib/node_modules/@stdlib/array/fixed-endian-factory/lib/main.js @@ -226,7 +226,6 @@ function factory( dtype ) { // eslint-disable-line max-lines-per-function, stdli * Typed array constructor which returns a typed array representing an array of values in a specified byte order. * * @private - * @class * @param {string} endianness - byte order * @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable * @param {NonNegativeInteger} [byteOffset=0] - byte offset