Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ function validate( opts, options ) {
if ( hasOwnProp( options, 'token' ) ) {
opts.token = options.token;
if ( !isString( opts.token ) ) {
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'token', opts.token ) );
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'token', opts.token ) );
}
}
if ( hasOwnProp( options, 'useragent' ) ) {
opts.useragent = options.useragent;
if ( !isString( opts.useragent ) ) {
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'useragent', opts.useragent ) );
return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'useragent', opts.useragent ) );
}
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/fs/read-dir/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ out = readDir.sync( 'beepboop' );
// returns <Error>

console.log( out instanceof Error );
// => true
// => false

/* Async */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

'use strict';

var resolve = require( 'path' ).resolve;
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var tryRequire = require( '@stdlib/utils/try-require' );

Check failure on line 22 in lib/node_modules/@stdlib/math/base/tools/evalpoly-compile/examples/index.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Last `require` statement in example files must be a relative path

var compile = tryRequire( resolve( __dirname, '..', 'lib' ) );
var compile = tryRequire( './../lib' );
if ( compile instanceof Error ) {
console.log( 'Unable to run example. Unsupported environment.' );
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,18 @@ var factory = require( './../lib' ).factory;
// FIXTURES //

var random2 = require( './fixtures/python/random2.json' );

var mediumNegative1 = require( './fixtures/python/medium_negative_1.json' );
var mediumNegative2 = require( './fixtures/python/medium_negative_2.json' );
var mediumNegative5 = require( './fixtures/python/medium_negative_5.json' );

var mediumPositive1 = require( './fixtures/python/medium_positive_1.json' );
var mediumPositive2 = require( './fixtures/python/medium_positive_2.json' );
var mediumPositive5 = require( './fixtures/python/medium_positive_5.json' );

var smallPositive1 = require( './fixtures/python/small_positive_1.json' );
var smallPositive2 = require( './fixtures/python/small_positive_2.json' );
var smallPositive5 = require( './fixtures/python/small_positive_5.json' );

var smallNegative1 = require( './fixtures/python/small_negative_1.json' );
var smallNegative2 = require( './fixtures/python/small_negative_2.json' );
var smallNegative5 = require( './fixtures/python/small_negative_5.json' );

var tiny1 = require( './fixtures/python/tiny_1.json' );
var tiny2 = require( './fixtures/python/tiny_2.json' );
var tiny5 = require( './fixtures/python/tiny_5.json' );
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/stats/ztest2/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ var y;
var i;

// Values drawn from a Normal(4,2) distribution
x = new Array( 100 );
x = [];
for ( i = 0; i < 100; i++ ) {
x[ i ] = rnorm( 4.0, 2.0 );
x.push( rnorm( 4.0, 2.0 ) );
}
// Values drawn from a Normal(3,2) distribution
y = new Array( 80 );
y = [];
for ( i = 0; i < 80; i++ ) {
y[ i ] = rnorm( 3.0, 2.0 );
y.push( rnorm( 3.0, 2.0 ) );
}

out = ztest2( x, y, 2.0, 2.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/utils/async/until/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ function untilAsync( predicate, fcn, done, thisArg ) {

// Cache the most recent results...
if ( arguments.length > 1 ) {
args = new Array( arguments.length-1 );
args = [];
for ( i = 1; i < arguments.length; i++ ) {
args[ i-1 ] = arguments[ i ];
args.push( arguments[ i ] );
}
}
// Run the test condition:
Expand Down
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/utils/pluck/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ bench( pkg, function benchmark( b ) {
var i;
var j;

arr = new Array( 100 );
for ( i = 0; i < arr.length; i++ ) {
tmp = new Array( 5 );
for ( j = 0; j < tmp.length; j++ ) {
tmp[ j ] = round( randu()*100.0*(j+1.0) );
arr = [];
for ( i = 0; i < 100; i++ ) {
tmp = [];
for ( j = 0; j < 5; j++ ) {
tmp.push( round( randu()*100.0*(j+1.0) ) );
}
arr[ i ] = tmp;
arr.push( tmp );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down
Loading