Skip to content

Commit 3c46f07

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 563dfe9 commit 3c46f07

11 files changed

Lines changed: 77 additions & 77 deletions

File tree

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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-
# isSameValuef
21+
# isSameValue
2222

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

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

33-
#### isSameValuef( a, b )
33+
#### isSameValue( 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 = isSameValuef( toFloat32( 3.14 ), toFloat32( 3.14 ) );
40+
var bool = isSameValue( toFloat32( 3.14 ), toFloat32( 3.14 ) );
4141
// returns true
4242

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

4747
In contrast to the strict equality operator `===`, the function distinguishes between `+0` and `-0` and treats `NaNs` as the same value.
4848

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

5151
```javascript
5252
var bool = ( 0.0 === -0.0 );
5353
// returns true
5454

55-
bool = isSameValuef( 0.0, -0.0 );
55+
bool = isSameValue( 0.0, -0.0 );
5656
// returns false
5757

58-
bool = isSameValuef( -0.0, -0.0 );
58+
bool = isSameValue( -0.0, -0.0 );
5959
// returns true
6060

6161
bool = ( NaN === NaN );
6262
// returns false
6363

64-
bool = isSameValuef( NaN, NaN );
64+
bool = isSameValue( NaN, NaN );
6565
// returns true
6666
```
6767

@@ -87,18 +87,18 @@ bool = isSameValuef( NaN, NaN );
8787

8888
```javascript
8989
var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
90-
var isSameValuef = require( '@stdlib/number/float32/base/assert/is-same-value' );
90+
var isSameValue = require( '@stdlib/number/float32/base/assert/is-same-value' );
9191

92-
var bool = isSameValuef( toFloat32( 3.14 ), toFloat32( 3.14 ) );
92+
var bool = isSameValue( toFloat32( 3.14 ), toFloat32( 3.14 ) );
9393
// returns true
9494

95-
bool = isSameValuef( toFloat32( 0.0 ), toFloat32( 0.0 ) );
95+
bool = isSameValue( toFloat32( 0.0 ), toFloat32( 0.0 ) );
9696
// returns true
9797

98-
bool = isSameValuef( toFloat32( -0.0 ), toFloat32( 0.0 ) );
98+
bool = isSameValue( toFloat32( -0.0 ), toFloat32( 0.0 ) );
9999
// returns false
100100

101-
bool = isSameValuef( toFloat32( NaN ), toFloat32( NaN ) );
101+
bool = isSameValue( toFloat32( NaN ), toFloat32( NaN ) );
102102
// returns true
103103
```
104104

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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 isSameValuef = require( './../lib' );
27+
var isSameValue = 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 = isSameValuef( v, v );
50+
bool = isSameValue( 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/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 isSameValuef = tryRequire( resolve( __dirname, './../lib/native.js' ) );
33+
var isSameValue = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3434
var opts = {
35-
'skip': ( isSameValuef instanceof Error )
35+
'skip': ( isSameValue 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 = isSameValuef( v, v );
59+
bool = isSameValue( 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/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 = isSameValuef( toFloat32( 3.14 ), toFloat32( 3.14 ) );
35+
* var bool = isSameValue( 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 = isSameValuef( toFloat32( -0.0 ), toFloat32( -0.0 ) );
41+
* var bool = isSameValue( 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 = isSameValuef( toFloat32( -0.0 ), toFloat32( 0.0 ) );
47+
* var bool = isSameValue( toFloat32( -0.0 ), toFloat32( 0.0 ) );
4848
* // returns false
4949
*
5050
* @example
5151
* var toFloat32 = require( '@stdlib/number/float64/base/to-float32' );
5252
*
53-
* var bool = isSameValuef( toFloat32( NaN ), toFloat32( NaN ) );
53+
* var bool = isSameValue( toFloat32( NaN ), toFloat32( NaN ) );
5454
* // returns true
5555
*/
56-
declare function isSameValuef( a: number, b: number ): boolean;
56+
declare function isSameValue( a: number, b: number ): boolean;
5757

5858

5959
// EXPORTS //
6060

61-
export = isSameValuef;
61+
export = isSameValue;

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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 isSameValuef = require( './index' );
19+
import isSameValue = require( './index' );
2020

2121

2222
// TESTS //
2323

2424
// The function returns a boolean...
2525
{
26-
isSameValuef( 3.14, 3.14 ); // $ExpectType boolean
26+
isSameValue( 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-
isSameValuef( '5', 3.14 ); // $ExpectError
32-
isSameValuef( true, 3.14 ); // $ExpectError
33-
isSameValuef( false, 3.14 ); // $ExpectError
34-
isSameValuef( null, 3.14 ); // $ExpectError
35-
isSameValuef( void 0, 3.14 ); // $ExpectError
36-
isSameValuef( [], 3.14 ); // $ExpectError
37-
isSameValuef( {}, 3.14 ); // $ExpectError
38-
isSameValuef( ( x: number ): number => x, 3.14 ); // $ExpectError
31+
isSameValue( '5', 3.14 ); // $ExpectError
32+
isSameValue( true, 3.14 ); // $ExpectError
33+
isSameValue( false, 3.14 ); // $ExpectError
34+
isSameValue( null, 3.14 ); // $ExpectError
35+
isSameValue( void 0, 3.14 ); // $ExpectError
36+
isSameValue( [], 3.14 ); // $ExpectError
37+
isSameValue( {}, 3.14 ); // $ExpectError
38+
isSameValue( ( 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-
isSameValuef( 3.14, '5' ); // $ExpectError
44-
isSameValuef( 3.14, true ); // $ExpectError
45-
isSameValuef( 3.14, false ); // $ExpectError
46-
isSameValuef( 3.14, null ); // $ExpectError
47-
isSameValuef( 3.14, void 0 ); // $ExpectError
48-
isSameValuef( 3.14, [] ); // $ExpectError
49-
isSameValuef( 3.14, {} ); // $ExpectError
50-
isSameValuef( 3.14, ( x: number ): number => x ); // $ExpectError
43+
isSameValue( 3.14, '5' ); // $ExpectError
44+
isSameValue( 3.14, true ); // $ExpectError
45+
isSameValue( 3.14, false ); // $ExpectError
46+
isSameValue( 3.14, null ); // $ExpectError
47+
isSameValue( 3.14, void 0 ); // $ExpectError
48+
isSameValue( 3.14, [] ); // $ExpectError
49+
isSameValue( 3.14, {} ); // $ExpectError
50+
isSameValue( 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-
isSameValuef(); // $ExpectError
56-
isSameValuef( 3.14 ); // $ExpectError
57-
isSameValuef( 3.14, 3.14, 3.14 ); // $ExpectError
55+
isSameValue(); // $ExpectError
56+
isSameValue( 3.14 ); // $ExpectError
57+
isSameValue( 3.14, 3.14, 3.14 ); // $ExpectError
5858
}

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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 isSameValuef = require( './../lib' );
22+
var isSameValue = require( './../lib' );
2323

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

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

30-
console.log( isSameValuef( toFloat32( -0.0 ), toFloat32( 0.0 ) ) );
30+
console.log( isSameValue( toFloat32( -0.0 ), toFloat32( 0.0 ) ) );
3131
// => false
3232

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

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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 isSameValuef = require( '@stdlib/number/float32/base/assert/is-same-value' );
28+
* var isSameValue = require( '@stdlib/number/float32/base/assert/is-same-value' );
2929
*
30-
* var bool = isSameValuef( toFloat32( 3.14 ), toFloat32( 3.14 ) );
30+
* var bool = isSameValue( toFloat32( 3.14 ), toFloat32( 3.14 ) );
3131
* // returns true
3232
*
33-
* bool = isSameValuef( toFloat32( -0.0 ), toFloat32( -0.0 ) );
33+
* bool = isSameValue( toFloat32( -0.0 ), toFloat32( -0.0 ) );
3434
* // returns true
3535
*
36-
* bool = isSameValuef( toFloat32( -0.0 ), toFloat32( 0.0 ) );
36+
* bool = isSameValue( toFloat32( -0.0 ), toFloat32( 0.0 ) );
3737
* // returns false
3838
*
39-
* bool = isSameValuef( toFloat32( NaN ), toFloat32( NaN ) );
39+
* bool = isSameValue( toFloat32( NaN ), toFloat32( NaN ) );
4040
* // returns true
4141
*/
4242

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@
3535
* @returns {boolean} boolean indicating whether two single-precision floating-point numbers are the same value
3636
*
3737
* @example
38-
* var bool = isSameValuef( 3.14, 3.14 );
38+
* var bool = isSameValue( 3.14, 3.14 );
3939
* // returns true
4040
*
4141
* @example
42-
* var bool = isSameValuef( -0.0, -0.0 );
42+
* var bool = isSameValue( -0.0, -0.0 );
4343
* // returns true
4444
*
4545
* @example
46-
* var bool = isSameValuef( -0.0, 0.0 );
46+
* var bool = isSameValue( -0.0, 0.0 );
4747
* // returns false
4848
*
4949
* @example
50-
* var bool = isSameValuef( NaN, NaN );
50+
* var bool = isSameValue( NaN, NaN );
5151
* // returns true
5252
*/
53-
function isSameValuef( a, b ) {
53+
function isSameValue( a, b ) {
5454
if ( a === b ) {
5555
if ( a === 0.0 ) {
5656
return 1.0 / a === 1.0 / b; // handles +-0
@@ -63,4 +63,4 @@ function isSameValuef( a, b ) {
6363

6464
// EXPORTS //
6565

66-
module.exports = isSameValuef;
66+
module.exports = isSameValue;

lib/node_modules/@stdlib/number/float32/base/assert/is-same-value/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 = isSameValuef( 3.14, 3.14 );
38+
* var bool = isSameValue( 3.14, 3.14 );
3939
* // returns true
4040
*
4141
* @example
42-
* var bool = isSameValuef( -0.0, -0.0 );
42+
* var bool = isSameValue( -0.0, -0.0 );
4343
* // returns true
4444
*
4545
* @example
46-
* var bool = isSameValuef( -0.0, 0.0 );
46+
* var bool = isSameValue( -0.0, 0.0 );
4747
* // returns false
4848
*
4949
* @example
50-
* var bool = isSameValuef( NaN, NaN );
50+
* var bool = isSameValue( NaN, NaN );
5151
* // returns true
5252
*/
53-
function isSameValuef( a, b ) {
53+
function isSameValue( a, b ) {
5454
return Boolean( addon( a, b ) );
5555
}
5656

5757

5858
// EXPORTS //
5959

60-
module.exports = isSameValuef;
60+
module.exports = isSameValue;

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

Lines changed: 4 additions & 4 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 isSameValuef = require( './../lib' );
25+
var isSameValue = 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 isSameValuef, 'function', 'main export is a function' );
32+
t.strictEqual( typeof isSameValue, 'function', 'main export is a function' );
3333
t.end();
3434
});
3535

@@ -46,7 +46,7 @@ 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( isSameValuef( values[ i ], values[ i ] ), true, 'returns expected value when provided '+values[ i ] );
49+
t.strictEqual( isSameValue( values[ i ], values[ i ] ), true, 'returns expected value when provided '+values[ i ] );
5050
}
5151
t.end();
5252
});
@@ -71,7 +71,7 @@ tape( 'the function returns `false` if not provided two single-precision floatin
7171
toFloat32( 0.0 )
7272
];
7373
for ( i = 0; i < a.length; i++ ) {
74-
t.strictEqual( isSameValuef( a[ i ], b[ i ] ), false, 'returns expected value when provided '+a[ i ]+' and '+b[ i ] );
74+
t.strictEqual( isSameValue( 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)