2.1 KiB
2.1 KiB
Object.defineProperty
Support
Detect
Object.defineProperty
support.
Usage
var hasDefinePropertySupport = require( '@stdlib/assert/has-define-property-support' );
hasDefinePropertySupport()
Detects if a runtime environment supports Object.defineProperty
.
var bool = hasDefinePropertySupport();
// returns <boolean>
Examples
var hasDefinePropertySupport = require( '@stdlib/assert/has-define-property-support' );
var bool = hasDefinePropertySupport();
if ( bool ) {
console.log( 'Environment has `Object.defineProperty` support.' );
} else {
console.log( 'Environment lacks `Object.defineProperty` support.' );
}
CLI
Usage
Usage: has-define-property-support [options]
Options:
-h, --help Print this message.
-V, --version Print the package version.
Examples
$ has-define-property-support
<boolean>