From 9780e1f7ed7c255711d251f23ecdfc01efd038c9 Mon Sep 17 00:00:00 2001 From: Abdul Kaium Date: Wed, 3 Jun 2026 15:00:40 +0600 Subject: [PATCH 1/4] feat: add `uint64/base/assert/is-equal` --- 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: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - 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: passed - task: lint_license_headers status: passed --- --- .../uint64/base/assert/is-equal/README.md | 118 ++++++++++++++++++ .../assert/is-equal/benchmark/benchmark.js | 60 +++++++++ .../assert/is-equal/docs/types/index.d.ts | 46 +++++++ .../base/assert/is-equal/docs/types/test.ts | 67 ++++++++++ .../base/assert/is-equal/examples/index.js | 32 +++++ .../uint64/base/assert/is-equal/lib/index.js | 44 +++++++ .../uint64/base/assert/is-equal/lib/main.js | 49 ++++++++ .../uint64/base/assert/is-equal/package.json | 70 +++++++++++ .../uint64/base/assert/is-equal/test/test.js | 65 ++++++++++ 9 files changed, 551 insertions(+) create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/package.json create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md new file mode 100644 index 000000000000..187850d31c75 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md @@ -0,0 +1,118 @@ + + +# isEqual + +> Test whether two unsigned 64-bit integers are equal. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); +``` + +#### isEqual( a, b ) + +Tests whether two unsigned 64-bit integers are equal. + +```javascript +var Uint64 = require( '@stdlib/number/uint64/ctor' ); + +var a = new Uint64( 1234 ); +var b = Uint64.of( 0, 1234 ); + +var out = isEqual( a, b ); +// returns true +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); + +var a = new Uint64( 1234 ); +var b = Uint64.of( 0, 1234 ); +var out = isEqual( a, b ); +// returns true + +a = new Uint64( 1234 ); +b = new Uint64( 5678 ); +out = isEqual( a, b ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js new file mode 100644 index 000000000000..2b8eef492ea0 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 MAX_SAFE_INTEGER = require( '@stdlib/constants/float64/max-safe-integer' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var isEqual = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var x; + var y; + var i; + var v; + + x = discreteUniform( 100, 0, MAX_SAFE_INTEGER ); + y = []; + + for (i = 0; i < x.length; i++ ) { + y.push( new Uint64( x[i] ) ); + } + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = isEqual( y[ i % y.length ], y[ (i+1) % y.length ] ); + if ( typeof v !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( v ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts new file mode 100644 index 000000000000..873cbbd2b8f5 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts @@ -0,0 +1,46 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Uint64 } from '@stdlib/types/number'; + +/** +* Tests whether two unsigned 64-bit integers are equal. +* +* @param a - first unsigned 64-bit integer +* @param b - second unsigned 64-bit integer +* @returns boolean indicating if both unsigned 64-bit integers are equal +* +* @example +* var Uint64 = require( '@stdlib/number/uint64/ctor' ); +* +* var a = new Uint64( 1234 ); +* var b = Uint64.of( 0, 1234 ); +* +* var v = isEqual( a, b ); +* // returns true +*/ +declare function isEqual( a: Uint64, b: Uint64 ): boolean; + + +// EXPORTS // + +export = isEqual; diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts new file mode 100644 index 000000000000..86d4c6053f8a --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts @@ -0,0 +1,67 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 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. +*/ + +import Uint64 = require( '@stdlib/number/uint64/ctor' ); +import isEqual = require( './index' ); + + +// TESTS // + +// The function returns a boolean... +{ + const a = new Uint64( 1234 ); + const b = Uint64.of( 0, 1234 ); + + isEqual( a, b ); // $ExpectType boolean +} + +// The compiler throws an error if the function is provided a first argument that is not an unsigned 64-bit integer... +{ + const b = new Uint64( 1234 ); + + isEqual( 'abc', b ); // $ExpectError + isEqual( 123, b ); // $ExpectError + isEqual( true, b ); // $ExpectError + isEqual( false, b ); // $ExpectError + isEqual( [], b ); // $ExpectError + isEqual( {}, b ); // $ExpectError + isEqual( ( x: number ): number => x, b ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument that is not an unsigned 64-bit integer... +{ + const a = new Uint64( 1234 ); + + isEqual( a, 'abc' ); // $ExpectError + isEqual( a, 123 ); // $ExpectError + isEqual( a, true ); // $ExpectError + isEqual( a, false ); // $ExpectError + isEqual( a, [] ); // $ExpectError + isEqual( a, {} ); // $ExpectError + isEqual( a, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const a = new Uint64( 1234 ); + const b = Uint64.of( 0, 1234 ); + + isEqual(); // $ExpectError + isEqual( a ); // $ExpectError + isEqual( a, b, {} ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js new file mode 100644 index 000000000000..c4d4fe132d76 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js @@ -0,0 +1,32 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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'; + +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var isEqual = require( './../lib' ); + +var a = new Uint64( 1234 ); +var b = Uint64.of( 0, 1234 ); +var out = isEqual( a, b ); +// returns true + +a = new Uint64( 1234 ); +b = new Uint64( 5678 ); +out = isEqual( a, b ); // eslint-disable-line no-unused-vars +// returns false diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js new file mode 100644 index 000000000000..9c0f102b7c6d --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js @@ -0,0 +1,44 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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'; + +/** +* Test whether two unsigned 64-bit integers are equal. +* +* @module @stdlib/number/uint64/base/assert/is-equal +* +* @example +* var Uint64 = require( '@stdlib/number/uint64/ctor' ); +* var isEqual = require( '@stdlib/number/uint64/base/assert/is-equal' ); +* +* var a = new Uint64( 1234 ); +* var b = Uint64.of( 0, 1234 ); +* +* var v = isEqual( a, b ); +* // returns true +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js new file mode 100644 index 000000000000..862aae0703e2 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js @@ -0,0 +1,49 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 // + + +// MAIN // + +/** +* Tests whether two unsigned 64-bit integers are equal. +* +* @param {Uint64} a - first unsigned 64-bit integer +* @param {Uint64} b - second unsigned 64-bit integer +* @returns {boolean} result +* +* @example +* var Uint64 = require( '@stdlib/number/uint64/ctor' ); +* +* var a = new Uint64( 1234 ); +* var b = Uint64.of( 0, 1234 ); +* +* var v = isEqual( a, b ); +* // returns true +*/ +function isEqual( a, b ) { + return ( a.hi === b.hi && a.lo === b.lo ); +} + + +// EXPORTS // + +module.exports = isEqual; diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/package.json b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/package.json new file mode 100644 index 000000000000..61a8c8493c63 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/package.json @@ -0,0 +1,70 @@ +{ + "name": "@stdlib/number/uint64/base/assert/is-equal", + "version": "0.0.0", + "description": "Test whether two unsigned 64-bit integers are equal.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "uint64", + "unsigned", + "64-bit", + "integer", + "base", + "assert", + "test", + "validate", + "equality", + "compare", + "comparison", + "equal", + "eq" + ] +} diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js new file mode 100644 index 000000000000..b8105ec17071 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js @@ -0,0 +1,65 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 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 hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' ); +var BigInt = require( '@stdlib/bigint/ctor' ); +var Uint64 = require( '@stdlib/number/uint64/ctor' ); +var isEqual = require( './../lib' ); + + +// VARIABLES // + +var HAS_BIGINT = hasBigIntSupport(); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof isEqual, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function tests whether two unsigned 64-bit integers are equal', function test( t ) { + var a; + var b; + + a = new Uint64( 1234 ); + t.strictEqual( isEqual( a, a ), true, 'returns expected value' ); + + a = new Uint64( 1234 ); + b = Uint64.of( 0, 1234 ); + t.strictEqual( isEqual( a, b ), true, 'returns expected value' ); + + a = new Uint64.from( [ 0, 1234 ] ); + b = Uint64.of( 0, 1234 ); + t.strictEqual( isEqual( a, b ), false, 'returns expected value' ); + + if ( HAS_BIGINT ) { + a = new Uint64( 1234 ); + b = new Uint64( BigInt( 1234 ) ); + t.strictEqual( isEqual( a, b ), false, 'returns expected value' ); + } + + t.end(); +}); From 26e10c3b68dba82c2c83c4524b529f24c7cdce29 Mon Sep 17 00:00:00 2001 From: Abdul Kaium Date: Wed, 3 Jun 2026 15:02:50 +0600 Subject: [PATCH 2/4] feat: add repl help --- .../uint64/base/assert/is-equal/docs/repl.txt | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt new file mode 100644 index 000000000000..b0dcbae38618 --- /dev/null +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt @@ -0,0 +1,27 @@ + +{{alias}}( a, b ) + Tests whether two unsigned 64-bit integers are equal. + + Parameters + ---------- + a: Uint64 + first unsigned 64-bit integer. + + b: Uint64 + second unsigned 64-bit integer. + + Returns + ------- + out: boolean + Result. + + Examples + -------- + > var a = new {{alias:@stdlib/number/uint64/ctor}}( 1234 ); + > var b = {{alias:@stdlib/number/uint64/ctor}}.of( 0, 1234 ); + > var v = {{alias}}( a, b ) + true + + See Also + -------- + From d1bdea56b1bcaa6a59b8dce883ea6b7d6322ca13 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 3 Jun 2026 09:08:40 +0000 Subject: [PATCH 3/4] chore: update copyright years --- .../@stdlib/number/uint64/base/assert/is-equal/README.md | 2 +- .../number/uint64/base/assert/is-equal/benchmark/benchmark.js | 2 +- .../number/uint64/base/assert/is-equal/docs/types/index.d.ts | 2 +- .../number/uint64/base/assert/is-equal/docs/types/test.ts | 2 +- .../number/uint64/base/assert/is-equal/examples/index.js | 2 +- .../@stdlib/number/uint64/base/assert/is-equal/lib/index.js | 2 +- .../@stdlib/number/uint64/base/assert/is-equal/lib/main.js | 2 +- .../@stdlib/number/uint64/base/assert/is-equal/test/test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md index 187850d31c75..10cc3b7c42cc 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2024 The Stdlib Authors. +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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js index 2b8eef492ea0..fc3cc1cc18a4 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts index 873cbbd2b8f5..671f2af22d67 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts index 86d4c6053f8a..bd9d36a872e9 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js index c4d4fe132d76..abe8532007f9 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js index 9c0f102b7c6d..40e295691f99 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js index 862aae0703e2..140a6d7362dc 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js index b8105ec17071..f395f8c43bdd 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* 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. From 0c64d1f1d765cb255f1590df4e89ace6473913a0 Mon Sep 17 00:00:00 2001 From: Abdul Kaium Date: Wed, 3 Jun 2026 16:20:03 +0600 Subject: [PATCH 4/4] test: update tests and resolve lint errors --- 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: 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 --- --- .../uint64/base/assert/is-equal/benchmark/benchmark.js | 3 +-- .../number/uint64/base/assert/is-equal/docs/repl.txt | 4 ++-- .../number/uint64/base/assert/is-equal/test/test.js | 10 +++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js index fc3cc1cc18a4..c4c340339c6a 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/benchmark/benchmark.js @@ -39,8 +39,7 @@ bench( pkg, function benchmark( b ) { x = discreteUniform( 100, 0, MAX_SAFE_INTEGER ); y = []; - - for (i = 0; i < x.length; i++ ) { + for ( i = 0; i < x.length; i++ ) { y.push( new Uint64( x[i] ) ); } diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt index b0dcbae38618..ff352be44ebd 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/docs/repl.txt @@ -5,10 +5,10 @@ Parameters ---------- a: Uint64 - first unsigned 64-bit integer. + First unsigned 64-bit integer. b: Uint64 - second unsigned 64-bit integer. + Second unsigned 64-bit integer. Returns ------- diff --git a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js index f395f8c43bdd..b1682c9281fc 100644 --- a/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js +++ b/lib/node_modules/@stdlib/number/uint64/base/assert/is-equal/test/test.js @@ -51,13 +51,21 @@ tape( 'the function tests whether two unsigned 64-bit integers are equal', funct b = Uint64.of( 0, 1234 ); t.strictEqual( isEqual( a, b ), true, 'returns expected value' ); - a = new Uint64.from( [ 0, 1234 ] ); + a = Uint64.from( [ 0, 1234 ] ); b = Uint64.of( 0, 1234 ); + t.strictEqual( isEqual( a, b ), true, 'returns expected value' ); + + a = new Uint64( 1234 ); + a = new Uint64( 5678 ); t.strictEqual( isEqual( a, b ), false, 'returns expected value' ); if ( HAS_BIGINT ) { a = new Uint64( 1234 ); b = new Uint64( BigInt( 1234 ) ); + t.strictEqual( isEqual( a, b ), true, 'returns expected value' ); + + a = new Uint64( 1234 ); + b = new Uint64( BigInt( 5678 ) ); t.strictEqual( isEqual( a, b ), false, 'returns expected value' ); }