Skip to content

Commit 6797982

Browse files
committed
chore: fix JavaScript lint errors (issue #8208)
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 6006497 commit 6797982

File tree

1 file changed

+25
-28
lines changed
  • lib/node_modules/@stdlib/assert/is-bigint/benchmark

1 file changed

+25
-28
lines changed

lib/node_modules/@stdlib/assert/is-bigint/benchmark/benchmark.js

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
* limitations under the License.
1717
*/
1818

19-
/* global BigInt */
20-
2119
/* eslint-disable no-new-wrappers, no-empty-function, stdlib/require-globals */
2220

2321
'use strict';
@@ -27,6 +25,7 @@
2725
var bench = require( '@stdlib/bench' );
2826
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2927
var hasBigInts = require( '@stdlib/assert/has-bigint-support' );
28+
var bigIntCtor = require( '@stdlib/bigint/ctor' );
3029
var pkg = require( './../package.json' ).name;
3130
var isBigInt = require( './../lib' );
3231

@@ -215,12 +214,11 @@ bench( pkg+'::primitives,bigints', opts, function benchmark( b ) {
215214
var values;
216215
var bool;
217216
var i;
218-
219217
values = [
220-
BigInt( '1' ),
221-
BigInt( '2' ),
222-
BigInt( 1 ),
223-
BigInt( 2 )
218+
bigIntCtor( '1' ),
219+
bigIntCtor( '2' ),
220+
bigIntCtor( 1 ),
221+
bigIntCtor( 2 )
224222
];
225223

226224
b.tic();
@@ -242,12 +240,11 @@ bench( pkg+'::objects,bigints', opts, function benchmark( b ) {
242240
var values;
243241
var bool;
244242
var i;
245-
246243
values = [
247-
Object( BigInt( '1' ) ),
248-
Object( BigInt( '2' ) ),
249-
Object( BigInt( 1 ) ),
250-
Object( BigInt( 2 ) )
244+
Object( bigIntCtor( '1' ) ),
245+
Object( bigIntCtor( '2' ) ),
246+
Object( bigIntCtor( 1 ) ),
247+
Object( bigIntCtor( 2 ) )
251248
];
252249

253250
b.tic();
@@ -271,10 +268,10 @@ bench( pkg+'::primitives,bigints:isPrimitive', opts, function benchmark( b ) {
271268
var i;
272269

273270
values = [
274-
BigInt( '1' ),
275-
BigInt( '2' ),
276-
BigInt( 1 ),
277-
BigInt( 2 )
271+
bigIntCtor( '1' ),
272+
bigIntCtor( '2' ),
273+
bigIntCtor( 1 ),
274+
bigIntCtor( 2 )
278275
];
279276

280277
b.tic();
@@ -298,10 +295,10 @@ bench( pkg+'::objects,bigints:isPrimitive', opts, function benchmark( b ) {
298295
var i;
299296

300297
values = [
301-
Object( BigInt( '1' ) ),
302-
Object( BigInt( '2' ) ),
303-
Object( BigInt( 1 ) ),
304-
Object( BigInt( 2 ) )
298+
Object( bigIntCtor( '1' ) ),
299+
Object( bigIntCtor( '2' ) ),
300+
Object( bigIntCtor( 1 ) ),
301+
Object( bigIntCtor( 2 ) )
305302
];
306303

307304
b.tic();
@@ -325,10 +322,10 @@ bench( pkg+'::primitives,bigints:isObject', opts, function benchmark( b ) {
325322
var i;
326323

327324
values = [
328-
BigInt( '1' ),
329-
BigInt( '2' ),
330-
BigInt( 1 ),
331-
BigInt( 2 )
325+
bigIntCtor( '1' ),
326+
bigIntCtor( '2' ),
327+
bigIntCtor( 1 ),
328+
bigIntCtor( 2 )
332329
];
333330

334331
b.tic();
@@ -352,10 +349,10 @@ bench( pkg+'::objects,bigints:isObject', opts, function benchmark( b ) {
352349
var i;
353350

354351
values = [
355-
Object( BigInt( '1' ) ),
356-
Object( BigInt( '2' ) ),
357-
Object( BigInt( 1 ) ),
358-
Object( BigInt( 2 ) )
352+
Object( bigIntCtor( '1' ) ),
353+
Object( bigIntCtor( '2' ) ),
354+
Object( bigIntCtor( 1 ) ),
355+
Object( bigIntCtor( 2 ) )
359356
];
360357

361358
b.tic();

0 commit comments

Comments
 (0)