From 86ba66f40ce30d5586bba13ff7dd47af5e079add Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 11 Aug 2026 17:26:36 +0000 Subject: [PATCH 1/9] feat: add implementation for method fill for uint64array --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/array/uint64/lib/main.js | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index e366fe395f55..1b0360300b86 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -709,6 +709,89 @@ setReadOnly( Uint64Array.prototype, 'entries', function entries() { } }); +/** +* Returns a modified typed array filled with a fill value. +* +* @name fill +* @memberof Uint64Array.prototype +* @type {Function} +* @param {Uint64|bigint|number} value - fill value +* @param {integer} [start=0] - starting index (inclusive) +* @param {integer} [end] - ending index (exclusive) +* @throws {TypeError} `this` must be a 64-bit unsigned integer array +* @throws {TypeError} first argument must be either a 64-bit unsigned integer or a value which can be converted to a 64-bit unsigned integer +* @throws {TypeError} second argument must be an integer +* @throws {TypeError} third argument must be an integer +* @returns {Uint64Array} modified array +* +* @example +* var arr = new Uint64Array( 3 ); +* +* arr.fill( 1, 1 ); +* +* var z = arr.get( 1 ); +* // returns [ 1n ] +* +* z = arr.get( 2 ); +* // returns [ 1n ] +*/ +setReadOnly( Uint64Array.prototype, 'fill', function fill( value, start, end ) { + var words; + var buf; + var len; + var idx; + var val; + var i; + if ( !isUint64Array( this ) ) { + throw new TypeError( 'invalid invocation. `this` is not a 64-bit unsigned integer array.' ); + } + try { + val = new Uint64( value ); + } catch ( err ) { // eslint-disable-line no-unused-vars + throw new TypeError( format( 'invalid argument. First argument must be either a 64-bit unsigned integer or a value which can be converted to a 64-bit unsigned integer. Value: `%s`.', value ) ); + } + buf = this._buffer; + len = this._length; + if ( arguments.length > 1 ) { + if ( !isInteger( start ) ) { + throw new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) ); + } + if ( start < 0 ) { + start += len; + if ( start < 0 ) { + start = 0; + } + } + if ( arguments.length > 2 ) { + if ( !isInteger( end ) ) { + throw new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) ); + } + if ( end < 0 ) { + end += len; + if ( end < 0 ) { + end = 0; + } + } + if ( end > len ) { + end = len; + } + } else { + end = len; + } + } else { + start = 0; + end = len; + } + words = [ 0, 0 ]; + toWords( val, words, 1, 0 ); + for ( i = start; i < end; i++ ) { + idx = 2*i; + buf[ idx+indices.HIGH ] = words[ 0 ]; + buf[ idx+indices.LOW ] = words[ 1 ]; + } + return this; +}); + /** * Returns an array element. * From a8580ec06859f3c03966d5b82ccad8063e3df12b Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 11 Aug 2026 18:12:57 +0000 Subject: [PATCH 2/9] chore: add uint64 convertion check --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/array/uint64/lib/main.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index 1b0360300b86..8d5c17f2a3bc 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -740,15 +740,16 @@ setReadOnly( Uint64Array.prototype, 'fill', function fill( value, start, end ) { var buf; var len; var idx; - var val; var i; if ( !isUint64Array( this ) ) { throw new TypeError( 'invalid invocation. `this` is not a 64-bit unsigned integer array.' ); } - try { - val = new Uint64( value ); - } catch ( err ) { // eslint-disable-line no-unused-vars - throw new TypeError( format( 'invalid argument. First argument must be either a 64-bit unsigned integer or a value which can be converted to a 64-bit unsigned integer. Value: `%s`.', value ) ); + if ( !isUint64( value ) ) { + try { + value = new Uint64( value ); + } catch ( err ) { // eslint-disable-line no-unused-vars + throw new TypeError( format( 'invalid argument. First argument must be either a 64-bit unsigned integer or a value which can be converted to a 64-bit unsigned integer. Value: `%s`.', value ) ); + } } buf = this._buffer; len = this._length; @@ -783,7 +784,7 @@ setReadOnly( Uint64Array.prototype, 'fill', function fill( value, start, end ) { end = len; } words = [ 0, 0 ]; - toWords( val, words, 1, 0 ); + toWords( value, words, 1, 0 ); for ( i = start; i < end; i++ ) { idx = 2*i; buf[ idx+indices.HIGH ] = words[ 0 ]; From bc3e2d14204437d678571ebdead41ad24615a124 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 12 Aug 2026 17:10:48 +0000 Subject: [PATCH 3/9] chore: checkpoint --- .../@stdlib/array/uint64/test/test.fill.js | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 lib/node_modules/@stdlib/array/uint64/test/test.fill.js diff --git a/lib/node_modules/@stdlib/array/uint64/test/test.fill.js b/lib/node_modules/@stdlib/array/uint64/test/test.fill.js new file mode 100644 index 000000000000..7f8701cc2d63 --- /dev/null +++ b/lib/node_modules/@stdlib/array/uint64/test/test.fill.js @@ -0,0 +1,282 @@ +/** +* @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 hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var isFunction = require( '@stdlib/assert/is-function' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var Uint64Array = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof Uint64Array, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'attached to the prototype of the main export is a `fill` method', function test( t ) { + t.strictEqual( hasOwnProp( Uint64Array.prototype, 'fill' ), true, 'has property' ); + t.strictEqual( isFunction( Uint64Array.prototype.fill ), true, 'has method' ); + t.end(); +}); + +tape( 'the method throws an error if invoked with a `this` context which is not a 64-bit unsigned integer array instance', function test( t ) { + var values; + var arr; + var i; + + arr = new Uint64Array( 5 ); + + 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.fill.call( value, new Uint64( 1 ) ); + }; + } +}); + +tape( 'the method throws an error if provided a first argument which is not a nonnegative integer, nonnegative bigint, 64-bit unsigned integer', function test( t ) { + var values; + var arr; + var i; + + arr = new Uint64Array( 5 ); + + 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.fill( value ); + }; + } +}); + +tape( 'the method throws an error if provided a second argument which is not an integer', function test( t ) { + var values; + var arr; + var i; + + arr = new Uint64Array( 10 ); + + 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.fill( new Uint64( 1 ), value ); + }; + } +}); + +tape( 'the method throws an error if provided a third argument which is not an integer', function test( t ) { + var values; + var arr; + var i; + + arr = new Uint64Array( 10 ); + + 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.fill( new Uint64( 1 ), 0, value ); + }; + } +}); + +tape( 'the method returns an empty array if operating on an empty 64-bit unsigned integer array', function test( t ) { + var arr; + var out; + + arr = new Uint64Array(); + out = arr.fill( new Uint64( 1 ) ); + + t.strictEqual( out instanceof Uint64Array, true, 'returns expected value' ); + t.strictEqual( out.length, 0, 'returns expected value' ); + t.end(); +}); + +tape( 'the method does not change the array length', function test( t ) { + var arr; + var out; + + arr = new Uint64Array( 10 ); + out = arr.fill( new Uint64( 1 ) ); + + t.strictEqual( out, arr, 'returns expected value' ); + t.strictEqual( arr.length, 10, 'returns expected value' ); + t.end(); +}); + +tape( 'if called with one argument, the method sets each array element to the provided value', function test( t ) { + var expected; + var arr; + + arr = new Uint64Array( 3 ); + expected = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); + + arr.fill( new Uint64( 1 ) ); + + t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); + t.end(); +}); + +// tape( 'if called with two arguments, the method sets each array element to the provided value starting from a start index (inclusive)', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 0.0, 0.0, 1.0, 1.0, 1.0, 1.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), 1 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); + +// tape( 'if called with three arguments, the method sets each array element to the provided value starting from a start index (inclusive) until a specified end index (exclusive)', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 0.0, 0.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), 0, 2 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); + +// tape( 'the method supports negative indices', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 0.0, 0.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), -3, -1 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); + +// tape( 'if a provided start index resolves to a negative index, the method fills an array starting from the first element', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), -10 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); + +// tape( 'if a provided end index resolves to an index exceeding the last array element index, the method fills an array until the last element (inclusive)', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 0.0, 0.0, 1.0, 1.0, 1.0, 1.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), 1, 10 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); + +// tape( 'if a provided start index resolves to an index which is greater than or equal to a resolved end index, the method does not fill an array', function test( t ) { +// var expected; +// var arr; + +// arr = new Uint64Array( 3 ); +// expected = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + +// arr.fill( new Uint64( 1.0, 1.0 ), 2, 1 ); + +// t.deepEqual( reinterpret128( arr, 0 ), expected, 'returns expected value' ); +// t.end(); +// }); From 5fb69552f6c486cdd1dea3761906317b6a72e088 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 14 Aug 2026 05:42:20 +0000 Subject: [PATCH 4/9] chore: update exmaples --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/array/uint64/lib/main.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index 8d5c17f2a3bc..1b085edf2888 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -726,14 +726,10 @@ setReadOnly( Uint64Array.prototype, 'entries', function entries() { * * @example * var arr = new Uint64Array( 3 ); +* // returns [ 0n , 0n, 0n ] * -* arr.fill( 1, 1 ); -* -* var z = arr.get( 1 ); -* // returns [ 1n ] -* -* z = arr.get( 2 ); -* // returns [ 1n ] +* arr = arr.fill( 1, 1 ); +* // returns [ 0n, 1n, 1n ] */ setReadOnly( Uint64Array.prototype, 'fill', function fill( value, start, end ) { var words; From 70b29ff8c3e80346a286b25c0d7f923bc7273595 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 14 Aug 2026 05:45:21 +0000 Subject: [PATCH 5/9] bench: add benchmarks --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../array/uint64/benchmark/benchmark.fill.js | 59 ++++++++++ .../uint64/benchmark/benchmark.fill.length.js | 103 ++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.js create mode 100644 lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.length.js diff --git a/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.js b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.js new file mode 100644 index 000000000000..57906323120c --- /dev/null +++ b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.js @@ -0,0 +1,59 @@ +/** +* @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 isUint64Array = require( '@stdlib/assert/is-uint64array' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var pkg = require( './../package.json' ).name; +var Uint64Array = require( './../lib' ); + + +// MAIN // + +bench( format( '%s:fill', pkg ), function benchmark( b ) { + var values; + var arr; + var out; + var i; + + values = [ + new Uint64( 1 ), + new Uint64( 2 ), + new Uint64( 3 ) + ]; + arr = new Uint64Array( 5 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = arr.fill( values[ i%values.length ] ); + if ( typeof out !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isUint64Array( out ) ) { + b.fail( 'should return a Uint64Array' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.length.js b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.length.js new file mode 100644 index 000000000000..ca8e0eefc600 --- /dev/null +++ b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.fill.length.js @@ -0,0 +1,103 @@ +/** +* @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 isUint64Array = require( '@stdlib/assert/is-uint64array' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var pkg = require( './../package.json' ).name; +var Uint64Array = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} len - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( len ) { + var arr = new Uint64Array( len ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var values; + var out; + var i; + + values = [ + new Uint64( 1 ), + new Uint64( 2 ), + new Uint64( 3 ) + ]; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = arr.fill( values[ i%values.length ] ); + if ( typeof out !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isUint64Array( out ) ) { + b.fail( 'should return a Uint64Array' ); + } + 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:fill:len=%d', pkg, len ), f ); + } +} + +main(); From cd2898a9c2cd780f8dd04f0438cb5f3b9a4d1d86 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 14 Aug 2026 05:48:42 +0000 Subject: [PATCH 6/9] docs: adds type definition --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/array/uint64/docs/types/index.d.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/uint64/docs/types/index.d.ts index 73e7941a80c5..cd5f8f2b2221 100644 --- a/lib/node_modules/@stdlib/array/uint64/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/uint64/docs/types/index.d.ts @@ -459,6 +459,23 @@ declare class Uint64Array implements Uint64ArrayInterface { */ entries(): TypedIterator<[number, Uint64]>; + /** + * Returns a modified typed array filled with a fill value. + * + * @param value - fill value + * @param start - starting index (inclusive) + * @param end - ending index (exclusive) + * @returns modified typed array + * + * @example + * var arr = new Uint64Array( 3 ); + * // returns [ 0n , 0n, 0n ] + * + * arr = arr.fill( 1, 1 ); + * // returns [ 0n, 1n, 1n ] + */ + fill( value: Uint, start?: number, end?: number ): Uint64Array; + /** * Returns an array element. * From 3377efefa47a004414dd2c73b42070d9b74dadb5 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 14 Aug 2026 05:52:05 +0000 Subject: [PATCH 7/9] docs: adds repl text --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/array/uint64/docs/repl.txt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt index 6dd3c27d5987..8eb60685d815 100644 --- a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt +++ b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt @@ -275,6 +275,34 @@ true +{{alias}}.prototype.fill( value[, start[, end]] ) + Returns a modified typed array filled with a fill value. + + Parameters + ---------- + value: Uint64 + Fill value. + + start: integer (optional) + Start index. If less than zero, the start index is resolved relative to + the last array element. Default: 0. + + end: integer (optional) + End index (non-inclusive). If less than zero, the end index is resolved + relative to the last array element. Default: out.length. + + Returns + ------- + out: Uint64Array + Modified array. + + Examples + -------- + > var arr = new {{alias}}( 3 ); + > arr.fill( 1 ) + [ 1n, 1n, 1n ] + + {{alias}}.prototype.get( i ) Returns an array element located at integer position (index) `i`. From da55dab86244355158ff8531c62ad43ad4c10707 Mon Sep 17 00:00:00 2001 From: Divit Date: Fri, 14 Aug 2026 06:03:07 +0000 Subject: [PATCH 8/9] docs: adds readme --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: passed - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/array/uint64/README.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/README.md b/lib/node_modules/@stdlib/array/uint64/README.md index 9e7ea549f00d..d982647eda04 100644 --- a/lib/node_modules/@stdlib/array/uint64/README.md +++ b/lib/node_modules/@stdlib/array/uint64/README.md @@ -316,6 +316,62 @@ The returned [iterator][mdn-iterator-protocol] protocol-compliant object has the - **next**: function which returns an [iterator][mdn-iterator-protocol] protocol-compliant object containing the next iterated value (if one exists) assigned to a `value` property and a `done` property having a `boolean` value indicating whether the [iterator][mdn-iterator-protocol] is finished. - **return**: function which closes an [iterator][mdn-iterator-protocol] and returns a single (optional) argument in an [iterator][mdn-iterator-protocol] protocol-compliant object. + + +#### Uint64Array.prototype.fill( value\[, start\[, end]] ) + +Returns a modified typed array filled with a fill value. + +```javascript +var Uint64 = require( '@stdlib/number/uint64/ctor' ); + +var arr = new Uint64Array( 3 ); + +// Set all elements to the same value: +arr.fill( new Uint64( 1 ) ); + +var u = arr.get( 0 ); +// returns [ 1n ] + +u = arr.get( 2 ); +// returns [ 1n ] + +// Fill all elements starting from the second element: +arr.fill( new Uint64( 2 ), 1 ); + +u = arr.get( 1 ); +// returns [ 2n ] + +u = arr.get( 2 ); +// returns [ 2n ] + +// Fill all elements from first element until the second-to-last element: +arr.fill( new Uint64( 3 ), 0, 2 ); + +u = arr.get( 0 ); +// returns [ 3n ] + +u = arr.get( 1 ); +// returns [ 3n ] +``` + +When a `start` and/or `end` index is negative, the respective index is determined relative to the last array element. + +```javascript +var Uint64 = require( '@stdlib/number/uint64/ctor' ); + +var arr = new Uint64Array( 3 ); + +// Set all array elements, except the last element, to the same value: +arr.fill( new Uint64( 1 ), 0, -1 ); + +var u = arr.get( 0 ); +// returns [ 1n ] + +u = arr.get( arr.length - 1 ); +// returns [ 0n ] +``` + #### Uint64Array.prototype.get( i ) From b12257e19a03c2eac33cfdcef9dd60a5ce90cfb5 Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 14 Oct 2026 22:04:04 +0200 Subject: [PATCH 9/9] Apply batched suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/array/uint64/README.md | 28 +++---------------- .../@stdlib/array/uint64/lib/main.js | 2 +- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/array/uint64/README.md b/lib/node_modules/@stdlib/array/uint64/README.md index 9ce291906dd7..3f36af04b09f 100644 --- a/lib/node_modules/@stdlib/array/uint64/README.md +++ b/lib/node_modules/@stdlib/array/uint64/README.md @@ -322,30 +322,15 @@ var arr = new Uint64Array( 3 ); // Set all elements to the same value: arr.fill( new Uint64( 1 ) ); - -var u = arr.get( 0 ); -// returns [ 1n ] - -u = arr.get( 2 ); -// returns [ 1n ] +// arr => [ 1n, 1n, 1n ] // Fill all elements starting from the second element: arr.fill( new Uint64( 2 ), 1 ); - -u = arr.get( 1 ); -// returns [ 2n ] - -u = arr.get( 2 ); -// returns [ 2n ] +// arr => [ 1n, 2n, 2n ] // Fill all elements from first element until the second-to-last element: arr.fill( new Uint64( 3 ), 0, 2 ); - -u = arr.get( 0 ); -// returns [ 3n ] - -u = arr.get( 1 ); -// returns [ 3n ] +// arr => [ 3n, 3n, 2n ] ``` When a `start` and/or `end` index is negative, the respective index is determined relative to the last array element. @@ -357,12 +342,7 @@ var arr = new Uint64Array( 3 ); // Set all array elements, except the last element, to the same value: arr.fill( new Uint64( 1 ), 0, -1 ); - -var u = arr.get( 0 ); -// returns [ 1n ] - -u = arr.get( arr.length - 1 ); -// returns [ 0n ] +// arr => [ 1n, 1n, 0n ] ``` diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index ce035c2d3579..ffa4563fb675 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -708,7 +708,7 @@ setReadOnly( Uint64Array.prototype, 'entries', function entries() { * @name fill * @memberof Uint64Array.prototype * @type {Function} -* @param {Uint64|bigint|number} value - fill value +* @param {(Uint64|bigint|number)} value - fill value * @param {integer} [start=0] - starting index (inclusive) * @param {integer} [end] - ending index (exclusive) * @throws {TypeError} `this` must be a 64-bit unsigned integer array