@@ -18,7 +18,7 @@ limitations under the License.
1818
1919-->
2020
21- # hasProperty
21+ # hasProp
2222
2323> Test if an object has a specified property, either own or inherited.
2424
@@ -27,10 +27,10 @@ limitations under the License.
2727## Usage
2828
2929``` javascript
30- var hasProperty = require ( ' @stdlib/assert/has-property' );
30+ var hasProp = require ( ' @stdlib/assert/has-property' );
3131```
3232
33- #### hasProperty ( value, property )
33+ #### hasProp ( value, property )
3434
3535Returns a boolean indicating if a ` value ` has a specified ` property ` , either own or inherited.
3636
@@ -39,13 +39,13 @@ var value = {
3939 ' beep' : ' boop'
4040};
4141
42- var bool = hasProperty ( value, ' beep' );
42+ var bool = hasProp ( value, ' beep' );
4343// returns true
4444
45- bool = hasProperty ( value, ' hasOwnProperty' );
45+ bool = hasProp ( value, ' hasOwnProperty' );
4646// returns true
4747
48- bool = hasProperty ( value, ' bap' );
48+ bool = hasProp ( value, ' bap' );
4949// returns false
5050```
5151
@@ -60,17 +60,17 @@ bool = hasProperty( value, 'bap' );
6060- The function does ** not** throw when provided ` null ` or ` undefined ` . Instead, the function returns ` false ` .
6161
6262 ``` javascript
63- var bool = hasProperty ( null , ' a' );
63+ var bool = hasProp ( null , ' a' );
6464 // returns false
6565
66- bool = hasProperty ( void 0 , ' a' );
66+ bool = hasProp ( void 0 , ' a' );
6767 // returns false
6868 ```
6969
7070- Value arguments other than ` null` or ` undefined` are coerced to objects.
7171
7272 ` ` ` javascript
73- var bool = hasProperty ( 'beep', 'length' );
73+ var bool = hasProp ( 'beep', 'length' );
7474 // returns true
7575 ` ` `
7676
@@ -80,13 +80,13 @@ bool = hasProperty( value, 'bap' );
8080 var value = {
8181 'null': false
8282 };
83- var bool = hasProperty ( value, null );
83+ var bool = hasProp ( value, null );
8484 // returns true
8585
8686 value = {
8787 '[object Object]': false
8888 };
89- bool = hasProperty ( value, {} );
89+ bool = hasProp ( value, {} );
9090 // returns true
9191 ` ` `
9292
@@ -103,30 +103,30 @@ bool = hasProperty( value, 'bap' );
103103<!-- eslint no- undef: " error" -->
104104
105105` ` ` javascript
106- var hasProperty = require( '@stdlib/assert/has-property' );
106+ var hasProp = require( '@stdlib/assert/has-property' );
107107
108- var bool = hasProperty ( { 'a': 'b' }, 'a' );
108+ var bool = hasProp ( { 'a': 'b' }, 'a' );
109109// returns true
110110
111- bool = hasProperty ( {}, 'hasOwnProperty' );
111+ bool = hasProp ( {}, 'hasOwnProperty' );
112112// returns true
113113
114- bool = hasProperty ( { 'a': 'b' }, 'c' );
114+ bool = hasProp ( { 'a': 'b' }, 'c' );
115115// returns false
116116
117- bool = hasProperty ( { 'a': 'b' }, null );
117+ bool = hasProp ( { 'a': 'b' }, null );
118118// returns false
119119
120- bool = hasProperty ( null, 'a' );
120+ bool = hasProp ( null, 'a' );
121121// returns false
122122
123- bool = hasProperty ( void 0, 'a' );
123+ bool = hasProp ( void 0, 'a' );
124124// returns false
125125
126- bool = hasProperty ( { 'null': false }, null );
126+ bool = hasProp ( { 'null': false }, null );
127127// returns true
128128
129- bool = hasProperty ( { '[object Object]': false }, {} );
129+ bool = hasProp ( { '[object Object]': false }, {} );
130130// returns true
131131` ` `
132132
0 commit comments