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