Skip to content

Commit 55d9e78

Browse files
authored
docs: update example
Signed-off-by: Athan <kgryte@gmail.com>
1 parent 2d2729c commit 55d9e78

File tree

1 file changed

+12
-3
lines changed
  • lib/node_modules/@stdlib/assert/is-enumerable-property/examples

1 file changed

+12
-3
lines changed

lib/node_modules/@stdlib/assert/is-enumerable-property/examples/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222

2323
var isEnumerableProperty = require( './../lib' );
2424

25-
var bool = isEnumerableProperty({ 'a': 'b' }, 'a');
25+
var obj = {
26+
'a': 'b'
27+
};
28+
var bool = isEnumerableProperty( obj, 'a' );
2629
console.log( bool );
2730
// => true
2831

@@ -50,10 +53,16 @@ bool = isEnumerableProperty( void 0, 'a' );
5053
console.log( bool );
5154
// => false
5255

53-
bool = isEnumerableProperty({ 'null': false }, null);
56+
obj = {
57+
'null': false
58+
};
59+
bool = isEnumerableProperty( obj, null );
5460
console.log( bool );
5561
// => true
5662

57-
bool = isEnumerableProperty({ '[object Object]': false }, {});
63+
obj = {
64+
'[object Object]': false
65+
};
66+
bool = isEnumerableProperty( obj, {} );
5867
console.log( bool );
5968
// => true

0 commit comments

Comments
 (0)