Skip to content

Commit 0f795ff

Browse files
committed
chore: rename variable
--- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - 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: passed - task: lint_license_headers status: passed ---
1 parent 3c46f07 commit 0f795ff

11 files changed

Lines changed: 81 additions & 81 deletions

File tree

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
1919
-->
2020

21-
# isSameValueZerof
21+
# isSameValueZero
2222

2323
> Test if two single-precision floating-point numbers are the same value.
2424
@@ -27,32 +27,32 @@ limitations under the License.
2727
## Usage
2828

2929
```javascript
30-
var isSameValueZerof = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
30+
var isSameValueZero = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
3131
```
3232

33-
#### isSameValueZerof( a, b )
33+
#### isSameValueZero( a, b )
3434

3535
Tests if two single-precision floating-point numbers `a` and `b` are the same value.
3636

3737
```javascript
3838
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
3939

40-
var bool = isSameValueZerof( toFloat32( 3.14 ), toFloat32( 3.14 ) );
40+
var bool = isSameValueZero( toFloat32( 3.14 ), toFloat32( 3.14 ) );
4141
// returns true
4242

43-
bool = isSameValueZerof( toFloat32( 5.0 ), toFloat32( 3.0 ) );
43+
bool = isSameValueZero( toFloat32( 5.0 ), toFloat32( 3.0 ) );
4444
// returns false
4545
```
4646

4747
In contrast to the strict equality operator `===`, the function treats `NaNs` as the same value.
4848

49-
<!-- eslint-disable use-isnan -->
49+
<!-- eslint-disable use-isnan, @cspell/spellchecker -->
5050

5151
```javascript
5252
var bool = ( NaN === NaN );
5353
// returns false
5454

55-
bool = isSameValueZerof( NaN, NaN );
55+
bool = isSameValueZero( NaN, NaN );
5656
// returns true
5757
```
5858

@@ -64,10 +64,10 @@ In contrast to the [SameValue Algorithm][@stdlib/number/float32/base/assert/is-s
6464
var bool = ( 0.0 === -0.0 );
6565
// returns true
6666

67-
bool = isSameValueZerof( 0.0, -0.0 );
67+
bool = isSameValueZero( 0.0, -0.0 );
6868
// returns true
6969

70-
bool = isSameValueZerof( -0.0, 0.0 );
70+
bool = isSameValueZero( -0.0, 0.0 );
7171
// returns true
7272
```
7373

@@ -89,18 +89,18 @@ bool = isSameValueZerof( -0.0, 0.0 );
8989

9090
```javascript
9191
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
92-
var isSameValueZerof = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
92+
var isSameValueZero = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
9393

94-
var bool = isSameValueZerof( toFloat32( 3.14 ), toFloat32( 3.14 ) );
94+
var bool = isSameValueZero( toFloat32( 3.14 ), toFloat32( 3.14 ) );
9595
// returns true
9696

97-
bool = isSameValueZerof( toFloat32( 0.0 ), toFloat32( 0.0 ) );
97+
bool = isSameValueZero( toFloat32( 0.0 ), toFloat32( 0.0 ) );
9898
// returns true
9999

100-
bool = isSameValueZerof( toFloat32( -0.0 ), toFloat32( 0.0 ) );
100+
bool = isSameValueZero( toFloat32( -0.0 ), toFloat32( 0.0 ) );
101101
// returns true
102102

103-
bool = isSameValueZerof( toFloat32( NaN ), toFloat32( NaN ) );
103+
bool = isSameValueZero( toFloat32( NaN ), toFloat32( NaN ) );
104104
// returns true
105105
```
106106

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/benchmark/benchmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench' );
2424
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2525
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
2626
var pkg = require( './../package.json' ).name;
27-
var isSameValueZerof = require( './../lib' );
27+
var isSameValueZero = require( './../lib' );
2828

2929

3030
// MAIN //
@@ -47,7 +47,7 @@ bench( pkg, function benchmark( b ) {
4747
b.tic();
4848
for ( i = 0; i < b.iterations; i++ ) {
4949
v = values[ i%values.length ];
50-
bool = isSameValueZerof( v, v );
50+
bool = isSameValueZero( v, v );
5151
if ( typeof bool !== 'boolean' ) {
5252
b.fail( 'should return a boolean' );
5353
}

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ var pkg = require( './../package.json' ).name;
3030

3131
// VARIABLES //
3232

33-
var isSameValueZerof = tryRequire( resolve( __dirname, './../lib/native.js' ) );
33+
var isSameValueZero = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3434
var opts = {
35-
'skip': ( isSameValueZerof instanceof Error )
35+
'skip': ( isSameValueZero instanceof Error )
3636
};
3737

3838

@@ -56,7 +56,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5656
b.tic();
5757
for ( i = 0; i < b.iterations; i++ ) {
5858
v = values[ i%values.length ];
59-
bool = isSameValueZerof( v, v );
59+
bool = isSameValueZero( v, v );
6060
if ( typeof bool !== 'boolean' ) {
6161
b.fail( 'should return a boolean' );
6262
}

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/docs/types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,30 @@
3232
* @example
3333
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
3434
*
35-
* var bool = isSameValueZerof( toFloat32( 3.14 ), toFloat32( 3.14 ) );
35+
* var bool = isSameValueZero( toFloat32( 3.14 ), toFloat32( 3.14 ) );
3636
* // returns true
3737
*
3838
* @example
3939
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
4040
*
41-
* var bool = isSameValueZerof( toFloat32( -0.0 ), toFloat32( -0.0 ) );
41+
* var bool = isSameValueZero( toFloat32( -0.0 ), toFloat32( -0.0 ) );
4242
* // returns true
4343
*
4444
* @example
4545
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
4646
*
47-
* var bool = isSameValueZerof( toFloat32( -0.0 ), toFloat32( 0.0 ) );
47+
* var bool = isSameValueZero( toFloat32( -0.0 ), toFloat32( 0.0 ) );
4848
* // returns true
4949
*
5050
* @example
5151
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
5252
*
53-
* var bool = isSameValueZerof( toFloat32( NaN ), toFloat32( NaN ) );
53+
* var bool = isSameValueZero( toFloat32( NaN ), toFloat32( NaN ) );
5454
* // returns true
5555
*/
56-
declare function isSameValueZerof( a: number, b: number ): boolean;
56+
declare function isSameValueZero( a: number, b: number ): boolean;
5757

5858

5959
// EXPORTS //
6060

61-
export = isSameValueZerof;
61+
export = isSameValueZero;

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/docs/types/test.ts

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

19-
import isSameValueZerof = require( './index' );
19+
import isSameValueZero = require( './index' );
2020

2121

2222
// TESTS //
2323

2424
// The function returns a boolean...
2525
{
26-
isSameValueZerof( 3.14, 3.14 ); // $ExpectType boolean
26+
isSameValueZero( 3.14, 3.14 ); // $ExpectType boolean
2727
}
2828

2929
// The compiler throws an error if the function is not provided a first argument which is a number...
3030
{
31-
isSameValueZerof( '5', 3.14 ); // $ExpectError
32-
isSameValueZerof( true, 3.14 ); // $ExpectError
33-
isSameValueZerof( false, 3.14 ); // $ExpectError
34-
isSameValueZerof( null, 3.14 ); // $ExpectError
35-
isSameValueZerof( void 0, 3.14 ); // $ExpectError
36-
isSameValueZerof( [], 3.14 ); // $ExpectError
37-
isSameValueZerof( {}, 3.14 ); // $ExpectError
38-
isSameValueZerof( ( x: number ): number => x, 3.14 ); // $ExpectError
31+
isSameValueZero( '5', 3.14 ); // $ExpectError
32+
isSameValueZero( true, 3.14 ); // $ExpectError
33+
isSameValueZero( false, 3.14 ); // $ExpectError
34+
isSameValueZero( null, 3.14 ); // $ExpectError
35+
isSameValueZero( void 0, 3.14 ); // $ExpectError
36+
isSameValueZero( [], 3.14 ); // $ExpectError
37+
isSameValueZero( {}, 3.14 ); // $ExpectError
38+
isSameValueZero( ( x: number ): number => x, 3.14 ); // $ExpectError
3939
}
4040

4141
// The compiler throws an error if the function is not provided a second argument which is a number...
4242
{
43-
isSameValueZerof( 3.14, '5' ); // $ExpectError
44-
isSameValueZerof( 3.14, true ); // $ExpectError
45-
isSameValueZerof( 3.14, false ); // $ExpectError
46-
isSameValueZerof( 3.14, null ); // $ExpectError
47-
isSameValueZerof( 3.14, void 0 ); // $ExpectError
48-
isSameValueZerof( 3.14, [] ); // $ExpectError
49-
isSameValueZerof( 3.14, {} ); // $ExpectError
50-
isSameValueZerof( 3.14, ( x: number ): number => x ); // $ExpectError
43+
isSameValueZero( 3.14, '5' ); // $ExpectError
44+
isSameValueZero( 3.14, true ); // $ExpectError
45+
isSameValueZero( 3.14, false ); // $ExpectError
46+
isSameValueZero( 3.14, null ); // $ExpectError
47+
isSameValueZero( 3.14, void 0 ); // $ExpectError
48+
isSameValueZero( 3.14, [] ); // $ExpectError
49+
isSameValueZero( 3.14, {} ); // $ExpectError
50+
isSameValueZero( 3.14, ( x: number ): number => x ); // $ExpectError
5151
}
5252

5353
// The compiler throws an error if the function is provided an unsupported number of arguments...
5454
{
55-
isSameValueZerof(); // $ExpectError
56-
isSameValueZerof( 3.14 ); // $ExpectError
57-
isSameValueZerof( 3.14, 3.14, 3.14 ); // $ExpectError
55+
isSameValueZero(); // $ExpectError
56+
isSameValueZero( 3.14 ); // $ExpectError
57+
isSameValueZero( 3.14, 3.14, 3.14 ); // $ExpectError
5858
}

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/examples/index.js

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

2121
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
22-
var isSameValueZerof = require( './../lib' );
22+
var isSameValueZero = require( './../lib' );
2323

24-
console.log( isSameValueZerof( toFloat32( 3.14 ), toFloat32( 3.14 ) ) );
24+
console.log( isSameValueZero( toFloat32( 3.14 ), toFloat32( 3.14 ) ) );
2525
// => true
2626

27-
console.log( isSameValueZerof( toFloat32( 0.0 ), toFloat32( 0.0 ) ) );
27+
console.log( isSameValueZero( toFloat32( 0.0 ), toFloat32( 0.0 ) ) );
2828
// => true
2929

30-
console.log( isSameValueZerof( toFloat32( -0.0 ), toFloat32( 0.0 ) ) );
30+
console.log( isSameValueZero( toFloat32( -0.0 ), toFloat32( 0.0 ) ) );
3131
// => true
3232

33-
console.log( isSameValueZerof( toFloat32( NaN ), toFloat32( NaN ) ) );
33+
console.log( isSameValueZero( toFloat32( NaN ), toFloat32( NaN ) ) );
3434
// => true

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
*
2626
* @example
2727
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
28-
* var isSameValueZerof = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
28+
* var isSameValueZero = require( '@stdlib/number/float32/base/assert/is-same-value-zero' );
2929
*
30-
* var bool = isSameValueZerof( toFloat32( 3.14 ), toFloat32( 3.14 ) );
30+
* var bool = isSameValueZero( toFloat32( 3.14 ), toFloat32( 3.14 ) );
3131
* // returns true
3232
*
33-
* bool = isSameValueZerof( toFloat32( -0.0 ), toFloat32( -0.0 ) );
33+
* bool = isSameValueZero( toFloat32( -0.0 ), toFloat32( -0.0 ) );
3434
* // returns true
3535
*
36-
* bool = isSameValueZerof( toFloat32( -0.0 ), toFloat32( 0.0 ) );
36+
* bool = isSameValueZero( toFloat32( -0.0 ), toFloat32( 0.0 ) );
3737
* // returns true
3838
*
39-
* bool = isSameValueZerof( toFloat32( NaN ), toFloat32( NaN ) );
39+
* bool = isSameValueZero( toFloat32( NaN ), toFloat32( NaN ) );
4040
* // returns true
4141
*/
4242

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/lib/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@
3333
* @returns {boolean} boolean indicating whether two single-precision floating-point numbers are the same value
3434
*
3535
* @example
36-
* var bool = isSameValueZerof( 3.14, 3.14 );
36+
* var bool = isSameValueZero( 3.14, 3.14 );
3737
* // returns true
3838
*
3939
* @example
40-
* var bool = isSameValueZerof( -0.0, -0.0 );
40+
* var bool = isSameValueZero( -0.0, -0.0 );
4141
* // returns true
4242
*
4343
* @example
44-
* var bool = isSameValueZerof( -0.0, 0.0 );
44+
* var bool = isSameValueZero( -0.0, 0.0 );
4545
* // returns true
4646
*
4747
* @example
48-
* var bool = isSameValueZerof( NaN, NaN );
48+
* var bool = isSameValueZero( NaN, NaN );
4949
* // returns true
5050
*/
51-
function isSameValueZerof( a, b ) {
51+
function isSameValueZero( a, b ) {
5252
return ( a === b ) || ( a !== a && b !== b ); // handles NaNs
5353
}
5454

5555

5656
// EXPORTS //
5757

58-
module.exports = isSameValueZerof;
58+
module.exports = isSameValueZero;

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/lib/native.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,26 @@ var addon = require( './../src/addon.node' );
3535
* @returns {boolean} boolean indicating whether two single-precision floating-point numbers are the same value
3636
*
3737
* @example
38-
* var bool = isSameValueZerof( 3.14, 3.14 );
38+
* var bool = isSameValueZero( 3.14, 3.14 );
3939
* // returns true
4040
*
4141
* @example
42-
* var bool = isSameValueZerof( -0.0, -0.0 );
42+
* var bool = isSameValueZero( -0.0, -0.0 );
4343
* // returns true
4444
*
4545
* @example
46-
* var bool = isSameValueZerof( -0.0, 0.0 );
46+
* var bool = isSameValueZero( -0.0, 0.0 );
4747
* // returns true
4848
*
4949
* @example
50-
* var bool = isSameValueZerof( NaN, NaN );
50+
* var bool = isSameValueZero( NaN, NaN );
5151
* // returns true
5252
*/
53-
function isSameValueZerof( a, b ) {
53+
function isSameValueZero( a, b ) {
5454
return Boolean( addon( a, b ) );
5555
}
5656

5757

5858
// EXPORTS //
5959

60-
module.exports = isSameValueZerof;
60+
module.exports = isSameValueZero;

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value-zero/test/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
var tape = require( 'tape' );
2424
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
25-
var isSameValueZerof = require( './../lib' );
25+
var isSameValueZero = require( './../lib' );
2626

2727

2828
// TESTS //
2929

3030
tape( 'main export is a function', function test( t ) {
3131
t.ok( true, __filename );
32-
t.strictEqual( typeof isSameValueZerof, 'function', 'main export is a function' );
32+
t.strictEqual( typeof isSameValueZero, 'function', 'main export is a function' );
3333
t.end();
3434
});
3535

@@ -46,11 +46,11 @@ tape( 'the function returns `true` if provided two single-precision floating-poi
4646
toFloat32( NaN )
4747
];
4848
for ( i = 0; i < values.length; i++ ) {
49-
t.strictEqual( isSameValueZerof( values[ i ], values[ i ] ), true, 'returns expected value when provided '+values[ i ] );
49+
t.strictEqual( isSameValueZero( values[ i ], values[ i ] ), true, 'returns expected value when provided '+values[ i ] );
5050
}
5151

52-
t.strictEqual( isSameValueZerof( toFloat32( -0.0 ), toFloat32( 0.0 ) ), true, 'returns expected value' );
53-
t.strictEqual( isSameValueZerof( toFloat32( 0.0 ), toFloat32( -0.0 ) ), true, 'returns expected value' );
52+
t.strictEqual( isSameValueZero( toFloat32( -0.0 ), toFloat32( 0.0 ) ), true, 'returns expected value' );
53+
t.strictEqual( isSameValueZero( toFloat32( 0.0 ), toFloat32( -0.0 ) ), true, 'returns expected value' );
5454

5555
t.end();
5656
});
@@ -71,7 +71,7 @@ tape( 'the function returns `false` if not provided two single-precision floatin
7171
toFloat32( 3.14 )
7272
];
7373
for ( i = 0; i < a.length; i++ ) {
74-
t.strictEqual( isSameValueZerof( a[ i ], b[ i ] ), false, 'returns expected value when provided '+a[ i ]+' and '+b[ i ] );
74+
t.strictEqual( isSameValueZero( a[ i ], b[ i ] ), false, 'returns expected value when provided '+a[ i ]+' and '+b[ i ] );
7575
}
7676
t.end();
7777
});

0 commit comments

Comments
 (0)