Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,13 @@ function plugin( dir, cwd, subpath ) {
opts = {};
opts.cwd = dir;

args = [];
args = [ 'test-cov' ];

// Environment variables:
if ( subpath ) {
subpath = subpath.replace( 'lib/node_modules/', '' );
args.push( 'TESTS_FILTER=.*/'+subpath+'/.*' );
args.unshift( 'TESTS_FILTER=.*/' + subpath + '/.*' );
}
// Target:
args.push( 'test-cov' );

proc = spawn( 'make', args, opts );
proc.on( 'error', onError );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ function plugin( dir ) {

opts = {};
opts.cwd = dir;

// Target:
args = [ 'view-cov' ];
// target
args = [];
args.push('view-cov');

proc = spawn( 'make', args, opts );
proc.on( 'error', onError );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/bigint/ctor/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
'use strict';

var hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' );
var BigInt = require( './../lib' );
var stdlibBigInt = require( './../lib' );

var v;

if ( hasBigIntSupport() ) {
v = BigInt( '1' );
v = stdlibBigInt( '1' );

// Print the value type:
console.log( typeof v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,33 +99,27 @@ tape( 'if provided an `N` parameter less than `1`, the function returns `-1`', o
t.end();
});

tape( 'the function supports specifying a stride', opts, function test( t ) {
var expected;
tape( 'the function supports specifying a negative stride', opts, function test( t ) {
var idx;
var x;

x = new Float32Array([
0.1, // 1
4.0,
-0.3, // 2
6.0,
-0.5, // 3
7.0,
-0.1, // 4
3.0
]);
expected = 2;
x = new Float32Array([ 3.0, -4.0, 1.0, 15.0, 4.0, 3.0 ]);

idx = isamax( x.length, x, -1 );
t.strictEqual( idx, 2, 'returns expected value' );

x = new Float32Array([ 3.0, 999.9, 999.9, -4.0, 999.9, 999.9, 1.0, 999.9, 999.9, 15.0, 999.9, 999.9, 4.0, 999.9, 999.9, 3.0 ]);
idx = isamax( 6, x, -3 );
t.strictEqual( idx, 2, 'returns expected value' );

idx = isamax( 4, x, 2 );
t.strictEqual( idx, expected, 'returns expected value' );
t.end();
});

tape( 'the function supports specifying a negative stride', opts, function test( t ) {
var idx;
var x;

x = new Float32Array( [ 3.0, -4.0, 1.0, 15.0, 4.0, 3.0 ] );
x = new Float32Array([ 3.0, -4.0, 1.0, 15.0, 4.0, 3.0 ]);

idx = isamax( x.length, x, -1 );
t.strictEqual( idx, 2, 'returns expected value' );
Expand Down
6 changes: 2 additions & 4 deletions lib/node_modules/@stdlib/utils/memoize/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ function memoize( fcn, hashFunction ) {
var out;
var key;
var i;
args = new Array( arguments.length );
for ( i = 0; i < arguments.length; i++ ) {
args[ i ] = arguments[ i ];
}
args = Array.from(arguments);

key = toKey( args ).toString();
if ( hasOwnProp( cache, key ) ) {
return cache[ key ];
Expand Down
8 changes: 6 additions & 2 deletions lib/node_modules/@stdlib/utils/tabulate-by/examples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

'use strict';


var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var take = require( '@stdlib/array/take' );
var tabulateBy = require( './../lib' );
Expand All @@ -32,8 +33,11 @@ function indicator( value ) {

vals = [ 'beep', 'boop', 'foo', 'bar', 'woot', 'woot' ];

// Generate a random collection...
arr = take( vals, discreteUniform( 100, 0, vals.length - 1 ) );
// Generate random indices:
var idx = discreteUniform( 100, 0, vals.length-1 );

// Select values:
arr = take( vals, idx );

// Generate a frequency table:
out = tabulateBy( arr, indicator );
Expand Down