diff --git a/any-by-right/benchmark/benchmark.js b/any-by-right/benchmark/benchmark.js index e647539d..b71d57e2 100644 --- a/any-by-right/benchmark/benchmark.js +++ b/any-by-right/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -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(); diff --git a/any-by/benchmark/benchmark.js b/any-by/benchmark/benchmark.js index f06445b4..fbc78c51 100644 --- a/any-by/benchmark/benchmark.js +++ b/any-by/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -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(); diff --git a/any/benchmark/benchmark.js b/any/benchmark/benchmark.js index ea9627ce..d92e67dc 100644 --- a/any/benchmark/benchmark.js +++ b/any/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -90,7 +90,7 @@ bench( pkg+'::loop', function benchmark( b ) { break; } } - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should be a boolean' ); } } diff --git a/bifurcate-by/benchmark/benchmark.js b/bifurcate-by/benchmark/benchmark.js index 6e2684ad..2ba0bbac 100644 --- a/bifurcate-by/benchmark/benchmark.js +++ b/bifurcate-by/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } diff --git a/bifurcate/benchmark/benchmark.js b/bifurcate/benchmark/benchmark.js index eb72b035..ccaf6945 100644 --- a/bifurcate/benchmark/benchmark.js +++ b/bifurcate/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } diff --git a/common-keys-in/docs/types/test.ts b/common-keys-in/docs/types/test.ts index 918e96c2..63cb933f 100644 --- a/common-keys-in/docs/types/test.ts +++ b/common-keys-in/docs/types/test.ts @@ -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 diff --git a/common-keys/docs/types/test.ts b/common-keys/docs/types/test.ts index bf5144bc..93f55bb4 100644 --- a/common-keys/docs/types/test.ts +++ b/common-keys/docs/types/test.ts @@ -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 diff --git a/constructor-name/benchmark/benchmark.js b/constructor-name/benchmark/benchmark.js index 272071e0..537d43d2 100644 --- a/constructor-name/benchmark/benchmark.js +++ b/constructor-name/benchmark/benchmark.js @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } @@ -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' ); } } diff --git a/convert-path/docs/types/test.ts b/convert-path/docs/types/test.ts index 28ecb398..d4c236f6 100644 --- a/convert-path/docs/types/test.ts +++ b/convert-path/docs/types/test.ts @@ -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 @@ -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 diff --git a/define-configurable-read-only-accessor/benchmark/benchmark.js b/define-configurable-read-only-accessor/benchmark/benchmark.js index 30df0030..a078c25c 100644 --- a/define-configurable-read-only-accessor/benchmark/benchmark.js +++ b/define-configurable-read-only-accessor/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-configurable-read-only-property/benchmark/benchmark.js b/define-configurable-read-only-property/benchmark/benchmark.js index 08d960ed..e8c73f93 100644 --- a/define-configurable-read-only-property/benchmark/benchmark.js +++ b/define-configurable-read-only-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-configurable-read-write-accessor/benchmark/benchmark.js b/define-configurable-read-write-accessor/benchmark/benchmark.js index 20ec386a..a2db4962 100644 --- a/define-configurable-read-write-accessor/benchmark/benchmark.js +++ b/define-configurable-read-write-accessor/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-memoized-configurable-read-only-property/benchmark/benchmark.js b/define-memoized-configurable-read-only-property/benchmark/benchmark.js index 41b3408e..46f6f607 100644 --- a/define-memoized-configurable-read-only-property/benchmark/benchmark.js +++ b/define-memoized-configurable-read-only-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-memoized-property/benchmark/benchmark.js b/define-memoized-property/benchmark/benchmark.js index ec7d16cc..e4740c4f 100644 --- a/define-memoized-property/benchmark/benchmark.js +++ b/define-memoized-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-memoized-read-only-property/benchmark/benchmark.js b/define-memoized-read-only-property/benchmark/benchmark.js index ecc5cedf..3ed1ad0b 100644 --- a/define-memoized-read-only-property/benchmark/benchmark.js +++ b/define-memoized-read-only-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-nonenumerable-property/benchmark/benchmark.js b/define-nonenumerable-property/benchmark/benchmark.js index 31268d30..1967dbf5 100644 --- a/define-nonenumerable-property/benchmark/benchmark.js +++ b/define-nonenumerable-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-nonenumerable-read-only-accessor/benchmark/benchmark.js b/define-nonenumerable-read-only-accessor/benchmark/benchmark.js index 3a7dc2e3..165ce480 100644 --- a/define-nonenumerable-read-only-accessor/benchmark/benchmark.js +++ b/define-nonenumerable-read-only-accessor/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-nonenumerable-read-only-property/benchmark/benchmark.js b/define-nonenumerable-read-only-property/benchmark/benchmark.js index 45a480c9..9c5cecce 100644 --- a/define-nonenumerable-read-only-property/benchmark/benchmark.js +++ b/define-nonenumerable-read-only-property/benchmark/benchmark.js @@ -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' ); } } diff --git a/define-nonenumerable-read-write-accessor/benchmark/benchmark.js b/define-nonenumerable-read-write-accessor/benchmark/benchmark.js index 8fb29c70..9569f18b 100644 --- a/define-nonenumerable-read-write-accessor/benchmark/benchmark.js +++ b/define-nonenumerable-read-write-accessor/benchmark/benchmark.js @@ -36,7 +36,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj = {}; setNonEnumerableReadWriteAccessor( obj, 'foo', getter( i.toString() ), setter ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/define-properties/benchmark/benchmark.js b/define-properties/benchmark/benchmark.js index 15570a40..3750a8ec 100644 --- a/define-properties/benchmark/benchmark.js +++ b/define-properties/benchmark/benchmark.js @@ -46,7 +46,7 @@ bench( pkg, function benchmark( b ) { obj = {}; descriptors.foo.value = fromCodePoint( 97 + (i%26) ); defineProperties( obj, descriptors ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/define-property/benchmark/benchmark.js b/define-property/benchmark/benchmark.js index af59859b..23bf91a8 100644 --- a/define-property/benchmark/benchmark.js +++ b/define-property/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { obj = {}; descriptor.value = fromCodePoint( 97 + (i%26) ); defineProperty( obj, 'foo', descriptor ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/define-read-only-accessor/benchmark/benchmark.js b/define-read-only-accessor/benchmark/benchmark.js index 522b30d0..062e64c6 100644 --- a/define-read-only-accessor/benchmark/benchmark.js +++ b/define-read-only-accessor/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj = {}; setReadOnlyAccessor( obj, 'foo', getter( i ) ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/define-read-only-property/benchmark/benchmark.js b/define-read-only-property/benchmark/benchmark.js index 3cc769c4..553e24ac 100644 --- a/define-read-only-property/benchmark/benchmark.js +++ b/define-read-only-property/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj = {}; setReadOnly( obj, 'foo', fromCodePoint( 97 + (i%26) ) ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/define-read-write-accessor/benchmark/benchmark.js b/define-read-write-accessor/benchmark/benchmark.js index 98bc79bf..c1fee0d7 100644 --- a/define-read-write-accessor/benchmark/benchmark.js +++ b/define-read-write-accessor/benchmark/benchmark.js @@ -36,7 +36,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj = {}; setReadWriteAccessor( obj, 'foo', getter( i.toString() ), setter ); - if ( !isString( obj.foo ) ) { + if ( typeof obj.foo !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/dirname/docs/types/test.ts b/dirname/docs/types/test.ts index fb01b26c..2cb236f2 100644 --- a/dirname/docs/types/test.ts +++ b/dirname/docs/types/test.ts @@ -26,7 +26,7 @@ import dirname = require( './index' ); dirname( './foo/bar/index.js' ); // $ExpectType string } -// The function does not compile if provided a value other than a string... +// The compiler throws an error if the function is provided a value other than a string... { dirname( true ); // $ExpectError dirname( false ); // $ExpectError diff --git a/do-until/docs/types/test.ts b/do-until/docs/types/test.ts index 3391986c..e24f5621 100644 --- a/do-until/docs/types/test.ts +++ b/do-until/docs/types/test.ts @@ -64,7 +64,7 @@ function noop() { doUntil( noop, {} ); // $ExpectError } -// The function does not compile if provided fewer than two arguments... +// The compiler throws an error if the function is provided fewer than two arguments... { doUntil(); // $ExpectError doUntil( noop ); // $ExpectError diff --git a/do-while/docs/types/test.ts b/do-while/docs/types/test.ts index 0f92a720..8f32300b 100644 --- a/do-while/docs/types/test.ts +++ b/do-while/docs/types/test.ts @@ -64,7 +64,7 @@ function noop() { doWhile( noop, {} ); // $ExpectError } -// The function does not compile if provided fewer than two arguments... +// The compiler throws an error if the function is provided fewer than two arguments... { doWhile(); // $ExpectError doWhile( noop ); // $ExpectError diff --git a/entries-in/benchmark/benchmark.js b/entries-in/benchmark/benchmark.js index b63d6665..5a1b2957 100644 --- a/entries-in/benchmark/benchmark.js +++ b/entries-in/benchmark/benchmark.js @@ -52,7 +52,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = objectEntriesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/entries/benchmark/benchmark.js b/entries/benchmark/benchmark.js index 607136dd..ada091c6 100644 --- a/entries/benchmark/benchmark.js +++ b/entries/benchmark/benchmark.js @@ -47,7 +47,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = objectEntries( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/enumerable-properties-in/benchmark/benchmark.js b/enumerable-properties-in/benchmark/benchmark.js index 91de28f0..f3647fc9 100644 --- a/enumerable-properties-in/benchmark/benchmark.js +++ b/enumerable-properties-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = enumerablePropertiesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/enumerable-properties/benchmark/benchmark.js b/enumerable-properties/benchmark/benchmark.js index 01ec1d61..be3d5a34 100644 --- a/enumerable-properties/benchmark/benchmark.js +++ b/enumerable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = enumerableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/enumerable-property-symbols-in/benchmark/benchmark.js b/enumerable-property-symbols-in/benchmark/benchmark.js index 138dced6..bd22db48 100644 --- a/enumerable-property-symbols-in/benchmark/benchmark.js +++ b/enumerable-property-symbols-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = enumerablePropertySymbolsIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/enumerable-property-symbols/benchmark/benchmark.js b/enumerable-property-symbols/benchmark/benchmark.js index 9f705439..5efcd9d4 100644 --- a/enumerable-property-symbols/benchmark/benchmark.js +++ b/enumerable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = enumerablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/escape-regexp-string/benchmark/benchmark.js b/escape-regexp-string/benchmark/benchmark.js index fd7e6068..baf82cf2 100644 --- a/escape-regexp-string/benchmark/benchmark.js +++ b/escape-regexp-string/benchmark/benchmark.js @@ -45,7 +45,7 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { str = rescape( values[ i % values.length ] ); - if ( !isString( str ) ) { + if ( typeof str !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/every-by-right/benchmark/benchmark.js b/every-by-right/benchmark/benchmark.js index 0da402c0..a0516595 100644 --- a/every-by-right/benchmark/benchmark.js +++ b/every-by-right/benchmark/benchmark.js @@ -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 ]; bool = everyByRight( arr, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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(); diff --git a/every-by/benchmark/benchmark.js b/every-by/benchmark/benchmark.js index 7a892706..4fe6a87f 100644 --- a/every-by/benchmark/benchmark.js +++ b/every-by/benchmark/benchmark.js @@ -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 ]; bool = everyBy( arr, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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(); diff --git a/every/benchmark/benchmark.js b/every/benchmark/benchmark.js index 2eda163f..032a6d3b 100644 --- a/every/benchmark/benchmark.js +++ b/every/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ i+1, i+2, i+3, i+4, i+5, 0 ]; bool = every( arr ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -62,7 +62,7 @@ bench( pkg+'::built-in', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ i+1, i+2, i+3, i+4, i+5, 0 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -90,8 +90,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(); diff --git a/extname/docs/types/test.ts b/extname/docs/types/test.ts index b11b1188..79a7f924 100644 --- a/extname/docs/types/test.ts +++ b/extname/docs/types/test.ts @@ -26,7 +26,7 @@ import extname = require( './index' ); extname( 'index.js' ); // $ExpectType string } -// The function does not compile if provided a value other than a string... +// The compiler throws an error if the function is provided a value other than a string... { extname( true ); // $ExpectError extname( false ); // $ExpectError diff --git a/flatten-array/benchmark/benchmark.copy.js b/flatten-array/benchmark/benchmark.copy.js index de507cf2..f7fb54a3 100644 --- a/flatten-array/benchmark/benchmark.copy.js +++ b/flatten-array/benchmark/benchmark.copy.js @@ -42,7 +42,7 @@ bench( pkg+':copy=true', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 1, [2, [3, [4, [ 5 ], 6], 7], 8], 9 ]; out = flattenArray( arr, opts ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/flatten-array/benchmark/benchmark.depth.js b/flatten-array/benchmark/benchmark.depth.js index 820c7d20..b229bb7b 100644 --- a/flatten-array/benchmark/benchmark.depth.js +++ b/flatten-array/benchmark/benchmark.depth.js @@ -41,7 +41,7 @@ bench( pkg+':depth=2', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 1, [2, [3, [4, [ 5 ], 6], 7], 8], 9 ]; out = flattenArray( arr, opts ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/flatten-array/benchmark/benchmark.factory.js b/flatten-array/benchmark/benchmark.factory.js index 4c6349f4..ede4e4d5 100644 --- a/flatten-array/benchmark/benchmark.factory.js +++ b/flatten-array/benchmark/benchmark.factory.js @@ -44,7 +44,7 @@ bench( pkg+':factory', function benchmark( b ) { [ 7, 8, 9 ] ]; out = flatten( arr ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/flatten-array/benchmark/benchmark.factory_copy.js b/flatten-array/benchmark/benchmark.factory_copy.js index c2bd746b..11e37ca1 100644 --- a/flatten-array/benchmark/benchmark.factory_copy.js +++ b/flatten-array/benchmark/benchmark.factory_copy.js @@ -50,7 +50,7 @@ bench( pkg+':factory:copy=true', function benchmark( b ) { [ 7, 8, 9 ] ]; out = flatten( arr ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/flatten-array/benchmark/benchmark.js b/flatten-array/benchmark/benchmark.js index 4efd5e55..255ff869 100644 --- a/flatten-array/benchmark/benchmark.js +++ b/flatten-array/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 1, [2, [3, [4, [ 5 ], 6], 7], 8], 9 ]; out = flattenArray( arr ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/flatten-array/benchmark/benchmark.large_arrays.js b/flatten-array/benchmark/benchmark.large_arrays.js index f1fff397..7b027308 100644 --- a/flatten-array/benchmark/benchmark.large_arrays.js +++ b/flatten-array/benchmark/benchmark.large_arrays.js @@ -60,7 +60,7 @@ bench( pkg+'::large_arrays', function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { out = flattenArray( data ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/function-name/benchmark/benchmark.js b/function-name/benchmark/benchmark.js index 2c39fafe..69ac4baf 100644 --- a/function-name/benchmark/benchmark.js +++ b/function-name/benchmark/benchmark.js @@ -75,7 +75,7 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { str = functionName( values[ i%values.length ] ); - if ( !isString( str ) ) { + if ( typeof str !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/function-name/docs/types/test.ts b/function-name/docs/types/test.ts index 9b61e764..f2481aaf 100644 --- a/function-name/docs/types/test.ts +++ b/function-name/docs/types/test.ts @@ -26,7 +26,7 @@ import functionName = require( './index' ); functionName( String ); // $ExpectType string } -// The function does not compile if provided a value other than a function... +// The compiler throws an error if the function is provided a value other than a function... { functionName( true ); // $ExpectError functionName( false ); // $ExpectError @@ -36,7 +36,7 @@ import functionName = require( './index' ); functionName( 'abc' ); // $ExpectError } -// The function does not compile if provided insufficient arguments... +// The compiler throws an error if the function is provided insufficient arguments... { functionName(); // $ExpectError } diff --git a/index-of/docs/types/test.ts b/index-of/docs/types/test.ts index 36dc858e..0b20932a 100644 --- a/index-of/docs/types/test.ts +++ b/index-of/docs/types/test.ts @@ -47,7 +47,7 @@ import indexOf = require( './index' ); indexOf( arr, 2, ( x: number ): number => x ); // $ExpectError } -// The function does not compile if provided an invalid number of arguments... +// The compiler throws an error if the function is provided an invalid number of arguments... { const arr = [ 1, 2, 3, 4, 5, 2, 6 ]; indexOf(); // $ExpectError diff --git a/inherited-enumerable-properties/benchmark/benchmark.js b/inherited-enumerable-properties/benchmark/benchmark.js index 2cbf977e..9894414f 100644 --- a/inherited-enumerable-properties/benchmark/benchmark.js +++ b/inherited-enumerable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedEnumerableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-enumerable-property-symbols/benchmark/benchmark.js b/inherited-enumerable-property-symbols/benchmark/benchmark.js index ff58301b..2f1f56eb 100644 --- a/inherited-enumerable-property-symbols/benchmark/benchmark.js +++ b/inherited-enumerable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedEnumerablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-keys/benchmark/benchmark.js b/inherited-keys/benchmark/benchmark.js index 9a7e49c8..3c798c72 100644 --- a/inherited-keys/benchmark/benchmark.js +++ b/inherited-keys/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedKeys( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-nonenumerable-properties/benchmark/benchmark.js b/inherited-nonenumerable-properties/benchmark/benchmark.js index dd6ce85a..df254015 100644 --- a/inherited-nonenumerable-properties/benchmark/benchmark.js +++ b/inherited-nonenumerable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedNonEnumerableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-nonenumerable-property-names/benchmark/benchmark.js b/inherited-nonenumerable-property-names/benchmark/benchmark.js index c8d491c7..baed0da7 100644 --- a/inherited-nonenumerable-property-names/benchmark/benchmark.js +++ b/inherited-nonenumerable-property-names/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedNonEnumerablePropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-nonenumerable-property-symbols/benchmark/benchmark.js b/inherited-nonenumerable-property-symbols/benchmark/benchmark.js index 02950b0f..46bc6059 100644 --- a/inherited-nonenumerable-property-symbols/benchmark/benchmark.js +++ b/inherited-nonenumerable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedNonEnumerablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-properties/benchmark/benchmark.js b/inherited-properties/benchmark/benchmark.js index cc9faf7a..a3b94547 100644 --- a/inherited-properties/benchmark/benchmark.js +++ b/inherited-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-property-names/benchmark/benchmark.js b/inherited-property-names/benchmark/benchmark.js index 6856a535..de4c9e88 100644 --- a/inherited-property-names/benchmark/benchmark.js +++ b/inherited-property-names/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedPropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-property-symbols/benchmark/benchmark.js b/inherited-property-symbols/benchmark/benchmark.js index 590f3c13..3e3c7922 100644 --- a/inherited-property-symbols/benchmark/benchmark.js +++ b/inherited-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedPropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-writable-properties/benchmark/benchmark.js b/inherited-writable-properties/benchmark/benchmark.js index 1847099a..d84ee192 100644 --- a/inherited-writable-properties/benchmark/benchmark.js +++ b/inherited-writable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedWritableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-writable-property-names/benchmark/benchmark.js b/inherited-writable-property-names/benchmark/benchmark.js index 7900c0c4..4e0e4c80 100644 --- a/inherited-writable-property-names/benchmark/benchmark.js +++ b/inherited-writable-property-names/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedWritablePropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/inherited-writable-property-symbols/benchmark/benchmark.js b/inherited-writable-property-symbols/benchmark/benchmark.js index 4c8838ca..9b2ba657 100644 --- a/inherited-writable-property-symbols/benchmark/benchmark.js +++ b/inherited-writable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = inheritedWritablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/keys-in/benchmark/benchmark.js b/keys-in/benchmark/benchmark.js index dfc78517..3ccd1902 100644 --- a/keys-in/benchmark/benchmark.js +++ b/keys-in/benchmark/benchmark.js @@ -52,7 +52,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = keysIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/keys-in/docs/types/test.ts b/keys-in/docs/types/test.ts index 5391eb99..808989a6 100644 --- a/keys-in/docs/types/test.ts +++ b/keys-in/docs/types/test.ts @@ -26,7 +26,7 @@ import keysIn = require( './index' ); keysIn( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType string[] } -// The function does not compile if provided insufficient arguments... +// The compiler throws an error if the function is provided insufficient arguments... { keysIn(); // $ExpectError } diff --git a/keys/benchmark/benchmark.js b/keys/benchmark/benchmark.js index c6ab4a95..3b374d63 100644 --- a/keys/benchmark/benchmark.js +++ b/keys/benchmark/benchmark.js @@ -63,7 +63,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = keys( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -98,7 +98,7 @@ bench( pkg+'::polyfill', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = polyfill( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -133,7 +133,7 @@ bench( pkg+'::builtin', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = Object.keys( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -168,7 +168,7 @@ bench( pkg+'::builtin_wrapper', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = wrapper( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -203,7 +203,7 @@ bench( pkg+'::builtin_arguments_wrapper', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = argsWrapper( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/keys/docs/types/test.ts b/keys/docs/types/test.ts index a95bce74..f25c73c3 100644 --- a/keys/docs/types/test.ts +++ b/keys/docs/types/test.ts @@ -26,7 +26,7 @@ import keys = require( './index' ); keys( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType string[] } -// The function does not compile if provided insufficient arguments... +// The compiler throws an error if the function is provided insufficient arguments... { keys(); // $ExpectError } diff --git a/map-function/docs/types/test.ts b/map-function/docs/types/test.ts index f13bac70..2acab93f 100644 --- a/map-function/docs/types/test.ts +++ b/map-function/docs/types/test.ts @@ -54,7 +54,7 @@ function identity( x: any ): any { mapFun( identity, {} ); // $ExpectError } -// The function does not compile if provided fewer than two arguments... +// The compiler throws an error if the function is provided fewer than two arguments... { mapFun(); // $ExpectError mapFun( identity ); // $ExpectError diff --git a/native-class/benchmark/benchmark.js b/native-class/benchmark/benchmark.js index 4b064540..daa77d90 100644 --- a/native-class/benchmark/benchmark.js +++ b/native-class/benchmark/benchmark.js @@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { str = nativeClass( values[ i%values.length ] ); - if ( !isString( str ) ) { + if ( typeof str !== 'string' ) { b.fail( 'should return a string' ); } } diff --git a/none-by-right/benchmark/benchmark.js b/none-by-right/benchmark/benchmark.js index a5397574..bbca404c 100644 --- a/none-by-right/benchmark/benchmark.js +++ b/none-by-right/benchmark/benchmark.js @@ -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 ]; bool = noneByRight( arr, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -95,7 +95,7 @@ bench( pkg+'::loop', function benchmark( b ) { break; } } - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should be a boolean' ); } } diff --git a/none-by/benchmark/benchmark.js b/none-by/benchmark/benchmark.js index 765ae524..82def150 100644 --- a/none-by/benchmark/benchmark.js +++ b/none-by/benchmark/benchmark.js @@ -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 ]; bool = noneBy( arr, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -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(); diff --git a/none/benchmark/benchmark.js b/none/benchmark/benchmark.js index e8916d33..1c1bde4d 100644 --- a/none/benchmark/benchmark.js +++ b/none/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 0, 0, 0, 0, 0, i+1 ]; bool = none( arr ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -62,7 +62,7 @@ bench( pkg+'::built-in', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 0, 0, 0, 0, 0, i+1 ]; bool = arr.every( predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -90,8 +90,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(); diff --git a/nonenumerable-properties-in/benchmark/benchmark.js b/nonenumerable-properties-in/benchmark/benchmark.js index d1abc606..0f4e13b4 100644 --- a/nonenumerable-properties-in/benchmark/benchmark.js +++ b/nonenumerable-properties-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerablePropertiesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonenumerable-properties/benchmark/benchmark.js b/nonenumerable-properties/benchmark/benchmark.js index 8e0af9c6..85823d24 100644 --- a/nonenumerable-properties/benchmark/benchmark.js +++ b/nonenumerable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonenumerable-property-names-in/benchmark/benchmark.js b/nonenumerable-property-names-in/benchmark/benchmark.js index ee271534..5130fae3 100644 --- a/nonenumerable-property-names-in/benchmark/benchmark.js +++ b/nonenumerable-property-names-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerablePropertyNamesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonenumerable-property-names/benchmark/benchmark.js b/nonenumerable-property-names/benchmark/benchmark.js index 991f4ee6..681a00c9 100644 --- a/nonenumerable-property-names/benchmark/benchmark.js +++ b/nonenumerable-property-names/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerablePropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonenumerable-property-symbols-in/benchmark/benchmark.js b/nonenumerable-property-symbols-in/benchmark/benchmark.js index 5339f902..5c239c1a 100644 --- a/nonenumerable-property-symbols-in/benchmark/benchmark.js +++ b/nonenumerable-property-symbols-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerablePropertySymbolsIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonenumerable-property-symbols/benchmark/benchmark.js b/nonenumerable-property-symbols/benchmark/benchmark.js index 78488338..796fa392 100644 --- a/nonenumerable-property-symbols/benchmark/benchmark.js +++ b/nonenumerable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonEnumerablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonindex-keys/benchmark/benchmark.js b/nonindex-keys/benchmark/benchmark.js index c85e9686..12401fad 100644 --- a/nonindex-keys/benchmark/benchmark.js +++ b/nonindex-keys/benchmark/benchmark.js @@ -52,7 +52,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = nonIndexKeys( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/nonindex-keys/docs/types/test.ts b/nonindex-keys/docs/types/test.ts index b9d658e8..d5e5a5e6 100644 --- a/nonindex-keys/docs/types/test.ts +++ b/nonindex-keys/docs/types/test.ts @@ -26,7 +26,7 @@ import nonIndexKeys = require( './index' ); nonIndexKeys( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType string[] } -// The function does not compile if provided insufficient arguments... +// The compiler throws an error if the function is provided insufficient arguments... { nonIndexKeys(); // $ExpectError } diff --git a/noop/benchmark/benchmark.js b/noop/benchmark/benchmark.js index fed76888..4b714032 100644 --- a/noop/benchmark/benchmark.js +++ b/noop/benchmark/benchmark.js @@ -36,7 +36,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { // Note: the following *could* be optimized away via inlining and loop-invariant code motion. If so, the entire loop will disappear. v = noop(); - if ( !isUndefined( v ) ) { + if ( v !== void 0 ) { b.fail( 'should return undefined' ); } } diff --git a/parse-json/docs/types/test.ts b/parse-json/docs/types/test.ts index 53977d84..56e5ce46 100644 --- a/parse-json/docs/types/test.ts +++ b/parse-json/docs/types/test.ts @@ -48,7 +48,7 @@ import parseJSON = require( './index' ); parseJSON( '{"beep":"boop"}', 'baz' ); // $ExpectError } -// The function does not compile if provided an unsupported number of arguments... +// The compiler throws an error if the function is provided an unsupported number of arguments... { parseJSON(); // $ExpectError parseJSON( '{"beep":"boop"}', 'baz', 'boz' ); // $ExpectError diff --git a/properties-in/benchmark/benchmark.js b/properties-in/benchmark/benchmark.js index 1e67a5a5..1152c76d 100644 --- a/properties-in/benchmark/benchmark.js +++ b/properties-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = propertiesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/properties/benchmark/benchmark.js b/properties/benchmark/benchmark.js index 2c2a51cd..cdea9208 100644 --- a/properties/benchmark/benchmark.js +++ b/properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = properties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/property-names-in/benchmark/benchmark.js b/property-names-in/benchmark/benchmark.js index e95b83d4..f3afaa78 100644 --- a/property-names-in/benchmark/benchmark.js +++ b/property-names-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = propertyNamesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/property-names/benchmark/benchmark.js b/property-names/benchmark/benchmark.js index 5416ebac..a1596a85 100644 --- a/property-names/benchmark/benchmark.js +++ b/property-names/benchmark/benchmark.js @@ -68,7 +68,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = getOwnPropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -109,7 +109,7 @@ bench( pkg+'::polyfill', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = polyfill( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -150,7 +150,7 @@ bench( pkg+'::builtin', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = Object.getOwnPropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/property-symbols-in/benchmark/benchmark.js b/property-symbols-in/benchmark/benchmark.js index debc3da9..0820e420 100644 --- a/property-symbols-in/benchmark/benchmark.js +++ b/property-symbols-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = propertySymbolsIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/property-symbols/benchmark/benchmark.js b/property-symbols/benchmark/benchmark.js index b71c6be0..8a1af43e 100644 --- a/property-symbols/benchmark/benchmark.js +++ b/property-symbols/benchmark/benchmark.js @@ -68,7 +68,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = getOwnPropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -109,7 +109,7 @@ bench( pkg+'::polyfill', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = polyfill( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -150,7 +150,7 @@ bench( pkg+'::builtin', opts, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = Object.getOwnPropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/some-by-right/benchmark/benchmark.js b/some-by-right/benchmark/benchmark.js index 8e43072e..4f976835 100644 --- a/some-by-right/benchmark/benchmark.js +++ b/some-by-right/benchmark/benchmark.js @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ NaN, i, i+1, NaN, i+3, i+4 ]; bool = someByRight( arr, 2, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -78,8 +78,8 @@ bench( pkg+'::loop', function benchmark( b ) { } } } - if ( !isBoolean( bool ) ) { - b.fail( 'should be a boolean' ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); } } b.toc(); diff --git a/some-by/benchmark/benchmark.js b/some-by/benchmark/benchmark.js index 70814998..8f7a2778 100644 --- a/some-by/benchmark/benchmark.js +++ b/some-by/benchmark/benchmark.js @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ i, i+1, i+2, NaN, i+4, NaN ]; bool = someBy( arr, 2, predicate ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -78,8 +78,8 @@ bench( pkg+'::loop', function benchmark( b ) { } } } - if ( !isBoolean( bool ) ) { - b.fail( 'should be a boolean' ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); } } b.toc(); diff --git a/some/benchmark/benchmark.js b/some/benchmark/benchmark.js index 61dedd0a..dca7c0ed 100644 --- a/some/benchmark/benchmark.js +++ b/some/benchmark/benchmark.js @@ -37,7 +37,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr = [ 0, 0, i+1, i+2, i+3, i+4 ]; bool = some( arr, 4 ); - if ( !isBoolean( bool ) ) { + if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); } } @@ -73,8 +73,8 @@ bench( pkg+'::loop', function benchmark( b ) { } } } - if ( !isBoolean( bool ) ) { - b.fail( 'should be a boolean' ); + if ( typeof bool !== 'boolean' ) { + b.fail( 'should return a boolean' ); } } b.toc(); diff --git a/tabulate-by/benchmark/benchmark.js b/tabulate-by/benchmark/benchmark.js index af17e94b..0b3ab302 100644 --- a/tabulate-by/benchmark/benchmark.js +++ b/tabulate-by/benchmark/benchmark.js @@ -55,7 +55,7 @@ bench( pkg, function benchmark( b ) { j = floor( randu()*vals.length ); arr[ 0 ] = vals[ j ]; out = tabulateBy( arr, indicator ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } @@ -96,7 +96,7 @@ bench( pkg+'::this_context', function benchmark( b ) { j = floor( randu()*vals.length ); arr[ 0 ] = vals[ j ]; out = tabulateBy( arr, opts, indicator ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/tabulate-by/benchmark/benchmark.length.js b/tabulate-by/benchmark/benchmark.length.js index 5360047c..d61241ce 100644 --- a/tabulate-by/benchmark/benchmark.length.js +++ b/tabulate-by/benchmark/benchmark.length.js @@ -76,7 +76,7 @@ function createBenchmark( len ) { j = floor( randu()*N ); x[ 0 ] = VALS[ j ]; out = tabulateBy( x, indicator ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/tabulate-by/benchmark/benchmark.uniqueness.js b/tabulate-by/benchmark/benchmark.uniqueness.js index d288553e..91057552 100644 --- a/tabulate-by/benchmark/benchmark.uniqueness.js +++ b/tabulate-by/benchmark/benchmark.uniqueness.js @@ -72,7 +72,7 @@ function createBenchmark( len, arr, N ) { j = floor( randu()*N ); x[ 0 ] = arr[ j ]; out = tabulateBy( x, indicator ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/tabulate/benchmark/benchmark.js b/tabulate/benchmark/benchmark.js index 8db85009..ec5f4b49 100644 --- a/tabulate/benchmark/benchmark.js +++ b/tabulate/benchmark/benchmark.js @@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) { j = floor( randu()*vals.length ); arr[ 0 ] = vals[ j ]; out = tabulate( arr ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/tabulate/benchmark/benchmark.length.js b/tabulate/benchmark/benchmark.length.js index 4dbd8070..0d383b56 100644 --- a/tabulate/benchmark/benchmark.length.js +++ b/tabulate/benchmark/benchmark.length.js @@ -72,7 +72,7 @@ function createBenchmark( len ) { j = floor( randu()*N ); x[ 0 ] = VALS[ j ]; out = tabulate( x ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/tabulate/benchmark/benchmark.uniqueness.js b/tabulate/benchmark/benchmark.uniqueness.js index 1c1f4d24..a0859fc3 100644 --- a/tabulate/benchmark/benchmark.uniqueness.js +++ b/tabulate/benchmark/benchmark.uniqueness.js @@ -68,7 +68,7 @@ function createBenchmark( len, arr, N ) { j = floor( randu()*N ); x[ 0 ] = arr[ j ]; out = tabulate( x ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/try-require/benchmark/benchmark.js b/try-require/benchmark/benchmark.js index 58b3b5d6..a1cfb213 100644 --- a/try-require/benchmark/benchmark.js +++ b/try-require/benchmark/benchmark.js @@ -37,8 +37,8 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { path = ( i % 2 === 0 ) ? '@stdlib/assert/is-array' : './../lib'; out = tryRequire( path ); - if ( !isFunction( out ) ) { - b.fail( 'should return function' ); + if ( typeof out !== 'function' ) { + b.fail( 'should return a function' ); } } b.toc(); @@ -58,8 +58,8 @@ bench( pkg+'::require', function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { path = ( i % 2 === 0 ) ? '@stdlib/assert/is-array' : './../lib'; out = require( path ); // eslint-disable-line stdlib/no-dynamic-require - if ( !isFunction( out ) ) { - b.fail( 'should return function' ); + if ( typeof out !== 'function' ) { + b.fail( 'should return a function' ); } } b.toc(); diff --git a/until/docs/types/test.ts b/until/docs/types/test.ts index 9ee39e50..75de000a 100644 --- a/until/docs/types/test.ts +++ b/until/docs/types/test.ts @@ -64,7 +64,7 @@ function noop() { until( noop, {} ); // $ExpectError } -// The function does not compile if provided fewer than two arguments... +// The compiler throws an error if the function is provided fewer than two arguments... { until(); // $ExpectError until( noop ); // $ExpectError diff --git a/unzip/benchmark/benchmark.js b/unzip/benchmark/benchmark.js index 0313d0f8..4e58fc8e 100644 --- a/unzip/benchmark/benchmark.js +++ b/unzip/benchmark/benchmark.js @@ -48,7 +48,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { arr[ i % len ][ 1 ] += 10.0; unzipped = unzip( arr ); - if ( !isArray( unzipped ) ) { + if ( typeof unzipped !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/values-in/benchmark/benchmark.js b/values-in/benchmark/benchmark.js index 29f63d86..0d3514f0 100644 --- a/values-in/benchmark/benchmark.js +++ b/values-in/benchmark/benchmark.js @@ -52,7 +52,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = objectValuesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/values/benchmark/benchmark.js b/values/benchmark/benchmark.js index 829852dc..d0157644 100644 --- a/values/benchmark/benchmark.js +++ b/values/benchmark/benchmark.js @@ -47,7 +47,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = objectValues( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/while/docs/types/test.ts b/while/docs/types/test.ts index 565c8372..74cb41b1 100644 --- a/while/docs/types/test.ts +++ b/while/docs/types/test.ts @@ -64,7 +64,7 @@ function noop() { whilst( noop, {} ); // $ExpectError } -// The function does not compile if provided fewer than two arguments... +// The compiler throws an error if the function is provided fewer than two arguments... { whilst(); // $ExpectError whilst( noop ); // $ExpectError diff --git a/writable-properties-in/benchmark/benchmark.js b/writable-properties-in/benchmark/benchmark.js index 780c8d7c..71552654 100644 --- a/writable-properties-in/benchmark/benchmark.js +++ b/writable-properties-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writablePropertiesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/writable-properties/benchmark/benchmark.js b/writable-properties/benchmark/benchmark.js index 284c50fe..ad2841bb 100644 --- a/writable-properties/benchmark/benchmark.js +++ b/writable-properties/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writableProperties( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/writable-property-names-in/benchmark/benchmark.js b/writable-property-names-in/benchmark/benchmark.js index 3dd4fcf1..f7effdc3 100644 --- a/writable-property-names-in/benchmark/benchmark.js +++ b/writable-property-names-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writablePropertyNamesIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/writable-property-names/benchmark/benchmark.js b/writable-property-names/benchmark/benchmark.js index 226e0633..925e993b 100644 --- a/writable-property-names/benchmark/benchmark.js +++ b/writable-property-names/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writablePropertyNames( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/writable-property-symbols-in/benchmark/benchmark.js b/writable-property-symbols-in/benchmark/benchmark.js index 1094d4cb..8694d03f 100644 --- a/writable-property-symbols-in/benchmark/benchmark.js +++ b/writable-property-symbols-in/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writablePropertySymbolsIn( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/writable-property-symbols/benchmark/benchmark.js b/writable-property-symbols/benchmark/benchmark.js index 7b796a93..cd5934fc 100644 --- a/writable-property-symbols/benchmark/benchmark.js +++ b/writable-property-symbols/benchmark/benchmark.js @@ -59,7 +59,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { obj.f = randu(); out = writablePropertySymbols( obj ); - if ( !isArray( out ) ) { + if ( typeof out !== 'object' ) { b.fail( 'should return an array' ); } } diff --git a/zip/benchmark/benchmark.js b/zip/benchmark/benchmark.js index 908a14af..219ac48a 100644 --- a/zip/benchmark/benchmark.js +++ b/zip/benchmark/benchmark.js @@ -48,7 +48,7 @@ bench( pkg, function benchmark( b ) { for ( i = 0; i < b.iterations; i++ ) { x[ i % len ] += 10.0; o = zip( x, y ); - if ( !isArray( o ) ) { + if ( typeof o !== 'object' ) { b.fail( 'should return an array' ); } }