Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 28, 2022
1 parent 324a8f4 commit 956009a
Show file tree
Hide file tree
Showing 106 changed files with 170 additions and 170 deletions.
8 changes: 4 additions & 4 deletions any-by-right/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ NaN, i, i+1, i+2, i+3, i+4 ];
bool = anyByRight( arr, predicate );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand All @@ -67,7 +67,7 @@ bench( pkg+'::built-in', function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ i, i+1, i+2, i+3, i+4, NaN ];
bool = arr.some( predicate );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand Down Expand Up @@ -95,8 +95,8 @@ bench( pkg+'::loop', function benchmark( b ) {
break;
}
}
if ( !isBoolean( bool ) ) {
b.fail( 'should be a boolean' );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
Expand Down
8 changes: 4 additions & 4 deletions any-by/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ i, i+1, i+2, i+3, i+4, NaN ];
bool = anyBy( arr, predicate );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand All @@ -67,7 +67,7 @@ bench( pkg+'::built-in', function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ i, i+1, i+2, i+3, i+4, NaN ];
bool = arr.some( predicate );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand Down Expand Up @@ -95,8 +95,8 @@ bench( pkg+'::loop', function benchmark( b ) {
break;
}
}
if ( !isBoolean( bool ) ) {
b.fail( 'should be a boolean' );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
Expand Down
6 changes: 3 additions & 3 deletions any/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ 0, 0, 0, 0, 0, i ];
bool = any( arr );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand All @@ -62,7 +62,7 @@ bench( pkg+'::built-in', function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
arr = [ 0, 0, 0, 0, 0, 1 ];
bool = arr.some( predicate );
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ bench( pkg+'::loop', function benchmark( b ) {
break;
}
}
if ( !isBoolean( bool ) ) {
if ( typeof bool !== 'boolean' ) {
b.fail( 'should be a boolean' );
}
}
Expand Down
10 changes: 5 additions & 5 deletions bifurcate-by/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bench( pkg, function benchmark( b ) {
j = floor( randu()*vals.length );
arr[ 0 ] = vals[ j ];
o = bifurcateBy( arr, predicate );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -96,7 +96,7 @@ bench( pkg+'::values', function benchmark( b ) {
j = floor( randu()*vals.length );
arr[ 0 ] = vals[ j ];
o = bifurcateBy( arr, opts, predicate );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -137,7 +137,7 @@ bench( pkg+'::indices', function benchmark( b ) {
j = floor( randu()*vals.length );
arr[ 0 ] = vals[ j ];
o = bifurcateBy( arr, opts, predicate );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ bench( pkg+'::pairs', function benchmark( b ) {
j = floor( randu()*vals.length );
arr[ 0 ] = vals[ j ];
o = bifurcateBy( arr, opts, predicate );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -219,7 +219,7 @@ bench( pkg+'::this_context', function benchmark( b ) {
j = floor( randu()*vals.length );
arr[ 0 ] = vals[ j ];
o = bifurcateBy( arr, opts, predicate );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down
8 changes: 4 additions & 4 deletions bifurcate/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bench( pkg, function benchmark( b ) {
filter[ j ] = ( randu() < 0.5 );
}
o = bifurcate( arr, filter );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -96,7 +96,7 @@ bench( pkg+'::values', function benchmark( b ) {
filter[ j ] = ( randu() < 0.5 );
}
o = bifurcate( arr, opts, filter );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -137,7 +137,7 @@ bench( pkg+'::indices', function benchmark( b ) {
filter[ j ] = ( randu() < 0.5 );
}
o = bifurcate( arr, opts, filter );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ bench( pkg+'::pairs', function benchmark( b ) {
filter[ j ] = ( randu() < 0.5 );
}
o = bifurcate( arr, opts, filter );
if ( !isArray( o ) ) {
if ( typeof o !== 'object' ) {
b.fail( 'should return an array' );
}
}
Expand Down
2 changes: 1 addition & 1 deletion common-keys-in/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import commonKeysIn = require( './index' );
commonKeysIn( { 'a': 0, 'b': 1 }, { 'a': 0 } ); // $ExpectType string[]
}

// The function does not compile if provided insufficient arguments...
// The compiler throws an error if the function is provided insufficient arguments...
{
commonKeysIn(); // $ExpectError
commonKeysIn( {} ); // $ExpectError
Expand Down
2 changes: 1 addition & 1 deletion common-keys/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import commonKeys = require( './index' );
commonKeys( { 'a': 0, 'b': 1 }, { 'a': 0 } ); // $ExpectType string[]
}

// The function does not compile if provided insufficient arguments...
// The compiler throws an error if the function is provided insufficient arguments...
{
commonKeys(); // $ExpectError
commonKeys( {} ); // $ExpectError
Expand Down
26 changes: 13 additions & 13 deletions constructor-name/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bench( pkg, function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( values[ i%values.length ] );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -109,7 +109,7 @@ bench( pkg+'::array', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -131,7 +131,7 @@ bench( pkg+'::typed_array', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -153,7 +153,7 @@ bench( pkg+'::buffer', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -175,7 +175,7 @@ bench( pkg+'::error', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -197,7 +197,7 @@ bench( pkg+'::date', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -219,7 +219,7 @@ bench( pkg+'::string', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -241,7 +241,7 @@ bench( pkg+'::number', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -263,7 +263,7 @@ bench( pkg+'::boolean', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -285,7 +285,7 @@ bench( pkg+'::null', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -307,7 +307,7 @@ bench( pkg+'::object', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -329,7 +329,7 @@ bench( pkg+'::regexp', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand All @@ -351,7 +351,7 @@ bench( pkg+'::function', function benchmark( b ) {
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
str = constructorName( v );
if ( !isString( str ) ) {
if ( typeof str !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
4 changes: 2 additions & 2 deletions convert-path/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import convertPath = require( './index' );
convertPath( 'C:\\foo\\bar\\beep.c', 'posix' ); // $ExpectType string
}

// The function does not compile if provided arguments having invalid types...
// The compiler throws an error if the function is provided arguments having invalid types...
{
convertPath( true, 'win32' ); // $ExpectError
convertPath( false, 'win32' ); // $ExpectError
Expand All @@ -45,7 +45,7 @@ import convertPath = require( './index' );
convertPath( '/c/foo/bar/beep.c', ( x: number ): number => x ); // $ExpectError
}

// The function does not compile if provided insufficient arguments...
// The compiler throws an error if the function is provided insufficient arguments...
{
convertPath(); // $ExpectError
convertPath( 'abc' ); // $ExpectError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setConfigurableReadOnlyAccessor( obj, 'foo', getter( i ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setConfigurableReadOnly( obj, 'foo', fromCodePoint( 97 + (i%26) ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setConfigurableReadWriteAccessor( obj, 'foo', getter( i.toString() ), setter );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setMemoizedConfigurableReadOnly( obj, 'foo', f( i ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
2 changes: 1 addition & 1 deletion define-memoized-property/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bench( pkg, function benchmark( b ) {
obj = {};
descriptor.value = f( i );
defineMemoizedProperty( obj, 'foo', descriptor );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
2 changes: 1 addition & 1 deletion define-memoized-read-only-property/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setMemoizedReadOnly( obj, 'foo', f( i ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
2 changes: 1 addition & 1 deletion define-nonenumerable-property/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setNonEnumerableProperty( obj, 'foo', fromCodePoint( 97 + (i%26) ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setNonEnumerableReadOnlyAccessor( obj, 'foo', getter( i ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) {
for ( i = 0; i < b.iterations; i++ ) {
obj = {};
setNonEnumerableReadOnly( obj, 'foo', fromCodePoint( 97 + (i%26) ) );
if ( !isString( obj.foo ) ) {
if ( typeof obj.foo !== 'string' ) {
b.fail( 'should return a string' );
}
}
Expand Down
Loading

0 comments on commit 956009a

Please sign in to comment.