Skip to content

Commit 81737cd

Browse files
committed
style(assert): fix lint errors in has-same-constructor
1 parent 62cb3da commit 81737cd

File tree

1 file changed

+9
-12
lines changed
  • lib/node_modules/@stdlib/assert/has-same-constructor

1 file changed

+9
-12
lines changed

lib/node_modules/@stdlib/assert/has-same-constructor/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ var hasSameConstructor = require( '@stdlib/assert/has-same-constructor' );
3535
Returns a `boolean` indicating whether two given values has same contructor function.
3636

3737
```javascript
38-
var x = new Number(5);
39-
var y = new Number(10);
38+
var x = 5
39+
var y = 10;
4040
var bool = hasSameConstructor( x, y );
4141
// returns true
4242

43-
x = new Number(5);
43+
x = 5;
4444
y = [];
4545
bool = hasSameConstructor( x, y );
4646
// returns false
@@ -69,7 +69,7 @@ bool = hasSameConstructor( x, y );
6969
// returns false
7070
```
7171

72-
- Value arguments other than `null` or `undefined` are coerced to `objects`(e.g., “Primitives like `5` or `'hello'` are autoboxed to objects, such as `new Number(5)` or `new String('hello')`, for constructor checking”).
72+
- Value arguments other than `null` or `undefined` are coerced to `objects`.
7373

7474
```javascript
7575
var bool = hasSameConstructor( 'beep', 'length' );
@@ -94,19 +94,19 @@ var hasSameConstructor = require( '@stdlib/assert/has-same-constructor' );
9494
var bool = hasSameConstructor( [1, 2, 3], ['a', 'b', 'c'] );
9595
// returns true
9696
97-
bool = hasSameConstructor( [1, 2, 3], { key: 'value' } );
97+
bool = hasSameConstructor( [1, 2, 3], { 'key': 'value' } );
9898
// returns false
9999
100-
bool = hasSameConstructor( { name: 'Alice' }, { age: 30 } );
100+
bool = hasSameConstructor({ 'name': 'Alice' }, { 'age': 30 });
101101
// returns true
102102
103-
bool = hasSameConstructor( { name: 'Alice' }, new Date() );
103+
bool = hasSameConstructor( { 'name': 'Alice' }, new Date() );
104104
// returns false
105105
106106
bool = hasSameConstructor( new Date(), new Date() );
107107
// returns true
108108
109-
bool = hasSameConstructor( null, { name: 'Alice' } );
109+
bool = hasSameConstructor( null, { 'name': 'Alice' } );
110110
// returns false
111111
112112
bool = hasSameConstructor( undefined, [1, 2, 3] );
@@ -117,9 +117,6 @@ bool = hasSameConstructor( 42, 3.14 );
117117
118118
bool = hasSameConstructor( 42, 'Hello' );
119119
// returns false
120-
121-
bool = hasSameConstructor( function() {}, () => {} );
122-
// returns true
123120
```
124121

125122
</section>
@@ -152,4 +149,4 @@ bool = hasSameConstructor( function() {}, () => {} );
152149

153150
</section>
154151

155-
<!-- /.links -->
152+
<!-- /.links -->

0 commit comments

Comments
 (0)