From 85d39931e1da3cb09f5ac0ed0c7df454038b1ad0 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 10:42:05 +0000 Subject: [PATCH 1/8] feat: add implementation of uint64array.at() --- .../@stdlib/array/uint64/lib/main.js | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index a35e815ab144..f8a662d4fdae 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -774,6 +774,55 @@ setReadOnly( Uint64Array.prototype, 'set', function set( value ) { /* eslint-enable no-underscore-dangle */ }); +/** +* Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices. +* +* @name at +* @memberof Uint64Array.prototype +* @type {Function} +* @param {integer} idx - element index +* @throws {TypeError} `this` must be a 64-bit unsigned integer array +* @throws {TypeError} must provide an integer +* @returns {(Uint64|void)} array element +* +* @example +* var arr = new Uint64Array( 10 ); +* +* var u = arr.at( 0 ); +* // returns [ 0n ] +* +* arr.set( 1, 0 ); +* arr.set( 2, 1 ); +* arr.set( 9, 9 ); +* +* u = arr.at( 0 ); +* // returns [ 1n ] +* +* u = arr.at( -1 ); +* // returns [ 9n ] +* +* u = arr.at( 100 ); +* // returns undefined +* +* u = arr.at( -100 ); +* // returns undefined +*/ +setReadOnly( Uint64Array.prototype, 'at', function at( idx ) { + if ( !isUint64Array( this ) ) { + throw new TypeError( 'invalid invocation. `this` is not a 64-bit unsigned integer array.' ); + } + if ( !isInteger( idx ) ) { + throw new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) ); + } + if ( idx < 0 ) { + idx += this._length; + } + if ( idx < 0 || idx >= this._length ) { + return; + } + return getUint64( this._buffer, idx ); +}); + // EXPORTS // From aa7d69fd311de605b9dea07ac9546c27db0e57ba Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 10:59:52 +0000 Subject: [PATCH 2/8] test: add test for uint64array.at() --- 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: passed - 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/test/test.at.js | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 lib/node_modules/@stdlib/array/uint64/test/test.at.js diff --git a/lib/node_modules/@stdlib/array/uint64/test/test.at.js b/lib/node_modules/@stdlib/array/uint64/test/test.at.js new file mode 100644 index 000000000000..e24a89669b48 --- /dev/null +++ b/lib/node_modules/@stdlib/array/uint64/test/test.at.js @@ -0,0 +1,144 @@ +/** +* @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 Uint64 = require( '@stdlib/number/uint64/ctor' ); +var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); +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 an `at` method for returning an array element', function test( t ) { + t.strictEqual( hasOwnProp( Uint64Array.prototype, 'at' ), true, 'has property' ); + t.strictEqual( isFunction( Uint64Array.prototype.at ), 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, + {}, + [] + ]; + 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.at.call( value, 0 ); + }; + } +}); + +tape( 'the method throws an error if provided an index 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.at( value ); + }; + } +}); + +tape( 'the method returns `undefined` if provided an index which exceeds array dimensions', function test( t ) { + var arr; + var v; + var i; + + arr = new Uint64Array( 10 ); + for ( i = -arr.length; i < arr.length; i++ ) { + if ( i < 0 ) { + v = arr.at( i-arr.length ); + t.strictEqual( v, void 0, 'returns expected value for index '+(i-arr.length) ); + } else { + v = arr.at( arr.length+i ); + t.strictEqual( v, void 0, 'returns expected value for index '+(arr.length+i) ); + } + } + t.end(); +}); + +tape( 'the method returns an array element', function test( t ) { + var arr; + var v; + var i; + + arr = []; + for ( i = 0; i < 10; i++ ) { + arr.push( new Uint64( i ) ); + } + arr = new Uint64Array( arr ); + + for ( i = -arr.length; i < arr.length; i++ ) { + v = arr.at( i ); + if ( i < 0 ) { + t.strictEqual( isEqual( v, new Uint64( arr.length+i ) ), true, 'returns expected value for index '+i ); + } else { + t.strictEqual( isEqual( v, new Uint64( i ) ), true, 'returns expected value for index '+i ); + } + } + t.end(); +}); From 32c4bca548f198458452c72af65b39a703ad26ad Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 11:08:10 +0000 Subject: [PATCH 3/8] docs: add types for uint64array.at() --- .../array/uint64/docs/types/index.d.ts | 27 +++++++++++++++++++ 1 file changed, 27 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 fe4f08640876..5e66f513e8bb 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 @@ -399,6 +399,33 @@ declare class Uint64Array implements Uint64ArrayInterface { */ readonly length: number; + /** + * Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices. + * + * @param i - element index + * @throws index argument must be an integer + * @returns array element + * + * @example + * var arr = new Uint64Array( 10 ); + * + * var u = arr.at( 0 ); + * // returns [ 0n ] + * + * arr.set( 1, 0 ); + * arr.set( 9, 9 ); + * + * u = arr.at( -1 ); + * // returns [ 9n ] + * + * u = arr.at( 100 ); + * // returns undefined + * + * u = arr.at( -100 ); + * // returns undefined + */ + at( i: number ): Uint64 | void; + /** * Returns an array element. * From 820bd1781cee5ff150c597db674b7c473ad204e2 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 11:12:27 +0000 Subject: [PATCH 4/8] docs: add repl text for uint64array.at() --- .../@stdlib/array/uint64/docs/repl.txt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt index 64ba000628aa..e086dae80aeb 100644 --- a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt +++ b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt @@ -227,6 +227,31 @@ 5 +{{alias}}.prototype.at( i ) + Returns an array element located at integer position (index) `i`, with + support for both nonnegative and negative integer positions. + + If provided an index outside the array index range, the method returns + `undefined`. + + Parameters + ---------- + i: integer + Element index. + + Returns + ------- + out: Uint64|void + An array element. + + Examples + -------- + > var arr = new {{alias}}( [ 1, 2 ] ) + + > var z = arr.at( 1 ) + [ 2n ] + + {{alias}}.prototype.get( i ) Returns an array element located at integer position (index) `i`. From 9e1a928164a953882272a0ac799e44a27ae13556 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 11:23:07 +0000 Subject: [PATCH 5/8] bench: add benchmark for uint64array.at() --- 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.at.js | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js diff --git a/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js new file mode 100644 index 000000000000..49e991e7ffa9 --- /dev/null +++ b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js @@ -0,0 +1,87 @@ +/** +* @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 Uint64 = require( '@stdlib/number/uint64/ctor' ); +var isUint64 = require( '@stdlib/assert/is-uint64' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var Uint64Array = require( './../lib' ); + + +// MAIN // + +bench( format( '%s::nonnegative_indices:at', pkg ), function benchmark( b ) { + var arr; + var N; + var u; + var i; + + arr = []; + for ( i = 0; i < 10; i++ ) { + arr.push( new Uint64( i ) ); + } + arr = new Uint64Array( arr ); + N = arr.length; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + u = arr.at( i%N ); + if ( typeof u !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isUint64( u ) ) { + b.fail( 'should return a 64-bit unsigned integer' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( format( '%s::negative_indices:at', pkg ), function benchmark( b ) { + var arr; + var N; + var u; + var i; + + arr = []; + for ( i = 0; i < 10; i++ ) { + arr.push( new Uint64( i ) ); + } + arr = new Uint64Array( arr ); + N = arr.length; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + u = arr.at( -(i%N)-1 ); + if ( typeof u !== 'object' ) { + b.fail( 'should return an object' ); + } + } + b.toc(); + if ( !isUint64( u ) ) { + b.fail( 'should return a 64-bit unsigned integer' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); From b625f6591f6c577fb048037495ff4146b6281790 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Jul 2026 11:29:03 +0000 Subject: [PATCH 6/8] docs: add readme section for uint64array.at() --- .../@stdlib/array/uint64/README.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lib/node_modules/@stdlib/array/uint64/README.md b/lib/node_modules/@stdlib/array/uint64/README.md index 3c0a21f8c0fa..c36db82153ad 100644 --- a/lib/node_modules/@stdlib/array/uint64/README.md +++ b/lib/node_modules/@stdlib/array/uint64/README.md @@ -243,6 +243,41 @@ var arr = Uint64Array.of( 1, 2 ); // returns [ 1n, 2n ] ``` + + +#### Uint64Array.prototype.at( i ) + +Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer positions. + +```javascript +var arr = new Uint64Array( 10 ); + +// Set the first, second, and last elements: +arr.set( 1, 0 ); +arr.set( 2, 1 ); +arr.set( 9, 9 ); + +// Get the first element: +var z = arr.at( 0 ); +// returns [ 1n ] + +// Get the last element: +z = arr.at( -1 ); +// returns [ 9n ] +``` + +If provided an out-of-bounds index, the method returns `undefined`. + +```javascript +var arr = new Uint64Array( 10 ); + +var z = arr.at( 100 ); +// returns undefined + +z = arr.at( -100 ); +// returns undefined +``` + #### Uint64Array.prototype.get( i ) From b3ff27e8353e1c1dbb1ac1d2f733c629a9ace88c Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 1 Aug 2026 11:03:41 +0000 Subject: [PATCH 7/8] feat: add att --- 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: passed - 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 | 98 +++++++++---------- .../@stdlib/array/uint64/test/test.at.js | 2 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/lib/node_modules/@stdlib/array/uint64/lib/main.js b/lib/node_modules/@stdlib/array/uint64/lib/main.js index f8a662d4fdae..f04c7a9c2cc5 100644 --- a/lib/node_modules/@stdlib/array/uint64/lib/main.js +++ b/lib/node_modules/@stdlib/array/uint64/lib/main.js @@ -477,6 +477,55 @@ setReadOnly( Uint64Array, 'of', function of() { return new this( args ); }); +/** +* Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices. +* +* @name at +* @memberof Uint64Array.prototype +* @type {Function} +* @param {integer} idx - element index +* @throws {TypeError} `this` must be a 64-bit unsigned integer array +* @throws {TypeError} must provide an integer +* @returns {(Uint64|void)} array element +* +* @example +* var arr = new Uint64Array( 10 ); +* +* var u = arr.at( 0 ); +* // returns [ 0n ] +* +* arr.set( 1, 0 ); +* arr.set( 2, 1 ); +* arr.set( 9, 9 ); +* +* u = arr.at( 0 ); +* // returns [ 1n ] +* +* u = arr.at( -1 ); +* // returns [ 9n ] +* +* u = arr.at( 100 ); +* // returns undefined +* +* u = arr.at( -100 ); +* // returns undefined +*/ +setReadOnly( Uint64Array.prototype, 'at', function at( idx ) { + if ( !isUint64Array( this ) ) { + throw new TypeError( 'invalid invocation. `this` is not a 64-bit unsigned integer array.' ); + } + if ( !isInteger( idx ) ) { + throw new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) ); + } + if ( idx < 0 ) { + idx += this._length; + } + if ( idx < 0 || idx >= this._length ) { + return; + } + return getUint64( this._buffer, idx ); +}); + /** * Pointer to the underlying data buffer. * @@ -774,55 +823,6 @@ setReadOnly( Uint64Array.prototype, 'set', function set( value ) { /* eslint-enable no-underscore-dangle */ }); -/** -* Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices. -* -* @name at -* @memberof Uint64Array.prototype -* @type {Function} -* @param {integer} idx - element index -* @throws {TypeError} `this` must be a 64-bit unsigned integer array -* @throws {TypeError} must provide an integer -* @returns {(Uint64|void)} array element -* -* @example -* var arr = new Uint64Array( 10 ); -* -* var u = arr.at( 0 ); -* // returns [ 0n ] -* -* arr.set( 1, 0 ); -* arr.set( 2, 1 ); -* arr.set( 9, 9 ); -* -* u = arr.at( 0 ); -* // returns [ 1n ] -* -* u = arr.at( -1 ); -* // returns [ 9n ] -* -* u = arr.at( 100 ); -* // returns undefined -* -* u = arr.at( -100 ); -* // returns undefined -*/ -setReadOnly( Uint64Array.prototype, 'at', function at( idx ) { - if ( !isUint64Array( this ) ) { - throw new TypeError( 'invalid invocation. `this` is not a 64-bit unsigned integer array.' ); - } - if ( !isInteger( idx ) ) { - throw new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) ); - } - if ( idx < 0 ) { - idx += this._length; - } - if ( idx < 0 || idx >= this._length ) { - return; - } - return getUint64( this._buffer, idx ); -}); - // EXPORTS // diff --git a/lib/node_modules/@stdlib/array/uint64/test/test.at.js b/lib/node_modules/@stdlib/array/uint64/test/test.at.js index e24a89669b48..f8218e5f13a6 100644 --- a/lib/node_modules/@stdlib/array/uint64/test/test.at.js +++ b/lib/node_modules/@stdlib/array/uint64/test/test.at.js @@ -22,9 +22,9 @@ var tape = require( 'tape' ); var hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); var isFunction = require( '@stdlib/assert/is-function' ); var Uint64 = require( '@stdlib/number/uint64/ctor' ); -var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); var Uint64Array = require( './../lib' ); From aa64ff3ccacb55ee7e6c73161246ff009dd03225 Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 1 Aug 2026 17:19:07 +0000 Subject: [PATCH 8/8] chore: clean-up --- 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: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - 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 --- --- lib/node_modules/@stdlib/array/uint64/README.md | 4 ++-- .../@stdlib/array/uint64/benchmark/benchmark.at.js | 4 ++-- lib/node_modules/@stdlib/array/uint64/docs/repl.txt | 4 ++-- lib/node_modules/@stdlib/array/uint64/examples/index.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/array/uint64/README.md b/lib/node_modules/@stdlib/array/uint64/README.md index c36db82153ad..135bbba2b154 100644 --- a/lib/node_modules/@stdlib/array/uint64/README.md +++ b/lib/node_modules/@stdlib/array/uint64/README.md @@ -211,7 +211,7 @@ var arr = Uint64Array.from( [ 1, 2 ], mapFcn ); A callback function is provided two arguments: - **value**: source value. -- **index**: source index.. +- **index**: source index. To set the callback execution context, provide a `thisArg`. @@ -426,7 +426,7 @@ var arr = [ out = new Uint64Array( arr ); logEach( '%s', out ); -// Create a 64-bit unsigned integer array from an typed array: +// Create a 64-bit unsigned integer array from a typed array: arr = new Uint32Array( [ 1, 2, 3, 4 ] ); out = new Uint64Array( arr ); logEach( '%s', out ); diff --git a/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js index 49e991e7ffa9..eed6eb4aef14 100644 --- a/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js +++ b/lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.at.js @@ -21,9 +21,9 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var Uint64 = require( '@stdlib/number/uint64/ctor' ); -var isUint64 = require( '@stdlib/assert/is-uint64' ); var format = require( '@stdlib/string/format' ); +var isUint64 = require( '@stdlib/assert/is-uint64' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); var pkg = require( './../package.json' ).name; var Uint64Array = require( './../lib' ); diff --git a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt index e086dae80aeb..aad3a9918af8 100644 --- a/lib/node_modules/@stdlib/array/uint64/docs/repl.txt +++ b/lib/node_modules/@stdlib/array/uint64/docs/repl.txt @@ -242,12 +242,12 @@ Returns ------- out: Uint64|void - An array element. + Array element or `undefined`. Examples -------- > var arr = new {{alias}}( [ 1, 2 ] ) - + [ 1n, 2n ] > var z = arr.at( 1 ) [ 2n ] diff --git a/lib/node_modules/@stdlib/array/uint64/examples/index.js b/lib/node_modules/@stdlib/array/uint64/examples/index.js index 6ba020a5bf4b..8d4ed3642c3c 100644 --- a/lib/node_modules/@stdlib/array/uint64/examples/index.js +++ b/lib/node_modules/@stdlib/array/uint64/examples/index.js @@ -36,7 +36,7 @@ var arr = [ out = new Uint64Array( arr ); logEach( '%s', out ); -// Create a 64-bit unsigned integer array from an typed array: +// Create a 64-bit unsigned integer array from a typed array: arr = new Uint32Array( [ 1, 2, 3, 4 ] ); out = new Uint64Array( arr ); logEach( '%s', out );