We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45095b2 commit 2b906dcCopy full SHA for 2b906dc
lib/node_modules/@stdlib/utils/constructor-name/benchmark/benchmark.js
@@ -339,3 +339,25 @@ bench( pkg+'::regexp', function benchmark( b ) {
339
b.pass( 'benchmark finished' );
340
b.end();
341
});
342
+
343
+bench( pkg+'::function', function benchmark( b ) {
344
+ var str;
345
+ var v;
346
+ var i;
347
348
+ v = isString;
349
350
+ b.tic();
351
+ for ( i = 0; i < b.iterations; i++ ) {
352
+ str = constructorName( v );
353
+ if ( !isString( str ) ) {
354
+ b.fail( 'should return a string' );
355
+ }
356
357
+ b.toc();
358
359
360
361
+ b.pass( 'benchmark finished' );
362
+ b.end();
363
+});
0 commit comments