repl.txt (797B)
1 2 {{alias}}( value, property ) 3 Tests if an object has a specified property. 4 5 In contrast to the native `Object.prototype.hasOwnProperty`, this function 6 does not throw when provided `null` or `undefined`. Instead, the function 7 returns `false`. 8 9 Value arguments other than `null` or `undefined` are coerced to objects. 10 11 Property arguments are coerced to strings. 12 13 Parameters 14 ---------- 15 value: any 16 Value to test. 17 18 property: any 19 Property to test. 20 21 Returns 22 ------- 23 bool: boolean 24 Boolean indicating if an object has a specified property. 25 26 Examples 27 -------- 28 > var beep = { 'boop': true }; 29 > var bool = {{alias}}( beep, 'boop' ) 30 true 31 > bool = {{alias}}( beep, 'bop' ) 32 false 33 34 See Also 35 -------- 36