Skip to content

Commit d129878

Browse files
committed
fix: replace native BigInt with @stdlib/BigInt constructor to satifys linter
1 parent 633de00 commit d129878

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

lib/node_modules/@stdlib/_tools/makie/plugins/makie-test-cov/lib/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,13 @@ function plugin( dir, cwd, subpath ) {
8989
opts = {};
9090
opts.cwd = dir;
9191

92-
args = [];
92+
args = [ 'test-cov' ];
9393

9494
// Environment variables:
9595
if ( subpath ) {
9696
subpath = subpath.replace( 'lib/node_modules/', '' );
97-
args.push( 'TESTS_FILTER=.*/'+subpath+'/.*' );
97+
args.unshift( 'TESTS_FILTER=.*/' + subpath + '/.*' );
9898
}
99-
// Target:
100-
args.push( 'test-cov' );
10199

102100
proc = spawn( 'make', args, opts );
103101
proc.on( 'error', onError );

lib/node_modules/@stdlib/bigint/ctor/examples/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
'use strict';
2020

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

2424
var v;
2525

2626
if ( hasBigIntSupport() ) {
27-
v = BigInt( '1' );
27+
v = stdlibBigInt( '1' );
2828

2929
// Print the value type:
3030
console.log( typeof v );

lib/node_modules/@stdlib/blas/base/isamax/test/test.isamax.native.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,19 @@ tape( 'if provided an `N` parameter less than `1`, the function returns `-1`', o
9999
t.end();
100100
});
101101

102-
tape( 'the function supports specifying a stride', opts, function test( t ) {
103-
var expected;
102+
tape( 'the function supports specifying a negative stride', opts, function test( t ) {
104103
var idx;
105104
var x;
106105

107-
x = new Float32Array([
108-
0.1, // 1
109-
4.0,
110-
-0.3, // 2
111-
6.0,
112-
-0.5, // 3
113-
7.0,
114-
-0.1, // 4
115-
3.0
116-
]);
117-
expected = 2;
106+
x = new Float32Array([ 3.0, -4.0, 1.0, 15.0, 4.0, 3.0 ]);
107+
108+
idx = isamax( x.length, x, -1 );
109+
t.strictEqual( idx, 2, 'returns expected value' );
110+
111+
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 ]);
112+
idx = isamax( 6, x, -3 );
113+
t.strictEqual( idx, 2, 'returns expected value' );
118114

119-
idx = isamax( 4, x, 2 );
120-
t.strictEqual( idx, expected, 'returns expected value' );
121115
t.end();
122116
});
123117

lib/node_modules/@stdlib/utils/memoize/lib/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ function memoize( fcn, hashFunction ) {
8787
var out;
8888
var key;
8989
var i;
90-
args = new Array( arguments.length );
91-
for ( i = 0; i < arguments.length; i++ ) {
92-
args[ i ] = arguments[ i ];
93-
}
90+
args = Array.from(arguments);
91+
9492
key = toKey( args ).toString();
9593
if ( hasOwnProp( cache, key ) ) {
9694
return cache[ key ];

0 commit comments

Comments
 (0)