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(); 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' ); 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", 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