repl.txt (764B)
1 2 {{alias}}( value, property ) 3 Tests if an object's own or inherited property is readable and writable. 4 5 Parameters 6 ---------- 7 value: any 8 Value to test. 9 10 property: any 11 Property to test. 12 13 Returns 14 ------- 15 bool: boolean 16 Boolean indicating if an object's own or inherited property is readable 17 and writable. 18 19 Examples 20 -------- 21 > var obj = { 'boop': true }; 22 > var desc = {}; 23 > desc.configurable = false; 24 > desc.enumerable = false; 25 > desc.set = function setter( v ) { obj.boop = v; }; 26 > {{alias:@stdlib/utils/define-property}}( obj, 'beep', desc ); 27 > var bool = {{alias}}( obj, 'boop' ) 28 true 29 > bool = {{alias}}( obj, 'beep' ) 30 false 31 32 See Also 33 -------- 34