From 7d1d566e16958d74af4bc47987237e03815f64f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 01:05:59 +0000 Subject: [PATCH 1/4] bench: add missing benchmark for `assert/is-node-repl` Added missing benchmark/benchmark.js and registered the directory in the package.json `directories` field. Among the 348 packages in the assert namespace, benchmark/benchmark.js is present in 303 (87.1%); restricting to packages which export a function, is-node-repl was the sole member without a benchmark directory. Repository-wide, 4813 of 5246 function-exporting packages (91.7%) ship benchmark/benchmark.js, whereas 0 of 354 packages exporting a precomputed constant do -- and is-node-repl exports a function, isNodeREPL(), which walks the module parent chain and regex-tests a synthesized V8 stack trace on every call. All 45 sibling assert/has-*-support packages, which likewise export a nullary environment probe returning a boolean, ship a benchmark; this benchmark follows their template. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YbAWkamCVtdUsXqRp6Egag --- .../is-node-repl/benchmark/benchmark.js | 49 +++++++++++++++++++ .../@stdlib/assert/is-node-repl/package.json | 1 + 2 files changed, 50 insertions(+) create mode 100644 lib/node_modules/@stdlib/assert/is-node-repl/benchmark/benchmark.js diff --git a/lib/node_modules/@stdlib/assert/is-node-repl/benchmark/benchmark.js b/lib/node_modules/@stdlib/assert/is-node-repl/benchmark/benchmark.js new file mode 100644 index 000000000000..844540340eaf --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-node-repl/benchmark/benchmark.js @@ -0,0 +1,49 @@ +/** +* @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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var pkg = require( './../package.json' ).name; +var isNodeREPL = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var bool; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + // Note: the following *could* be optimized away via loop-invariant code motion. If so, the entire loop will disappear. + bool = isNodeREPL(); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); + } + } + b.toc(); + if ( !isBoolean( bool ) ) { + b.fail( 'should return a boolean' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/assert/is-node-repl/package.json b/lib/node_modules/@stdlib/assert/is-node-repl/package.json index 8ee4e87f5818..a802f0095420 100644 --- a/lib/node_modules/@stdlib/assert/is-node-repl/package.json +++ b/lib/node_modules/@stdlib/assert/is-node-repl/package.json @@ -16,6 +16,7 @@ "main": "./lib", "browser": "./lib/browser.js", "directories": { + "benchmark": "./benchmark", "doc": "./docs", "example": "./examples", "lib": "./lib", From 7257926db5af4372e8dfd8879ad40b91471c2cfd Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 01:22:08 +0000 Subject: [PATCH 2/4] docs: fix parameter type in `assert/is-well-formed-string` The `@param` tag declared `{string}` where the function accepts any value: the body is `isPrimitive( str ) || isObject( str )`, the tag's own `@example` blocks pass `[]` and `null` documenting `// returns false`, and the package's own docs/repl.txt and docs/types/index.d.ts already declare the parameter as `any`. Among the 220 assert packages documenting a single value argument, 220 use `@param {*}` and 219 describe it as "value to test"; the two other packages declaring `{string}` -- has-utf16-surrogate-pair-at and is-anagram -- throw on non-string input and are correctly typed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YbAWkamCVtdUsXqRp6Egag --- .../@stdlib/assert/is-well-formed-string/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/main.js b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/main.js index 5f4e0ec3a21d..0f78ac1b2f5e 100644 --- a/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-well-formed-string/lib/main.js @@ -29,7 +29,7 @@ var isObject = require( './object.js' ); /** * Tests if a string is well-formed. * -* @param {string} str - input string +* @param {*} str - value to test * @returns {boolean} boolean indicating whether a string is well-formed * * @example From 3e07761c7b744c06c112e9eebcd1651d8c5b1a38 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 01:22:26 +0000 Subject: [PATCH 3/4] docs: fix typos in `assert/is-ndarray-like-with-data-type` The `@returns` description read "ndarray-lik object" and "data typee". The same sentence is spelled correctly in the package's own docs/types/index.d.ts and docs/repl.txt. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YbAWkamCVtdUsXqRp6Egag --- .../@stdlib/assert/is-ndarray-like-with-data-type/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-ndarray-like-with-data-type/lib/main.js b/lib/node_modules/@stdlib/assert/is-ndarray-like-with-data-type/lib/main.js index 2a9d25817ce8..a3b74a9cee38 100644 --- a/lib/node_modules/@stdlib/assert/is-ndarray-like-with-data-type/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-ndarray-like-with-data-type/lib/main.js @@ -31,7 +31,7 @@ var getDType = require( '@stdlib/ndarray/base/dtype' ); * * @param {*} v - value to test * @param {*} dtype - data type -* @returns {boolean} boolean indicating if a value is an ndarray-lik object having a specified data typee +* @returns {boolean} boolean indicating if a value is an ndarray-like object having a specified data type * * @example * var ndarray = require( '@stdlib/ndarray/ctor' ); From 32fe7098f886075bb0487cc123573587f0bf2a9e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 01:22:54 +0000 Subject: [PATCH 4/4] docs: fix `@returns` description in `assert/is-leap-year` "boolean whether" is ungrammatical and was the only such instance in the namespace; 297 of the 322 assert packages documenting a boolean return use "boolean indicating". Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YbAWkamCVtdUsXqRp6Egag --- lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js b/lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js index 08ed03b96a31..e839c1d63ff7 100644 --- a/lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js +++ b/lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js @@ -35,7 +35,7 @@ var currentYear = require( '@stdlib/time/current-year' ); * - According to the Gregorian calendar, every year that is exactly divisible by `4` is a leap year, except those years which are also divisible by `100` and not by `400` (e.g., `1900`). * * @param {*} [value] - input value -* @returns {boolean} boolean whether a value corresponds to a leap year +* @returns {boolean} boolean indicating whether a value corresponds to a leap year * * @example * var bool = isLeapYear();