Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/assert/is-leap-year/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
});
1 change: 1 addition & 0 deletions lib/node_modules/@stdlib/assert/is-node-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"main": "./lib",
"browser": "./lib/browser.js",
"directories": {
"benchmark": "./benchmark",
"doc": "./docs",
"example": "./examples",
"lib": "./lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading