Object.defineProperties Support

Detect Object.defineProperties support.

Usage

var hasDefinePropertiesSupport = require( '@stdlib/assert/has-define-properties-support' );

hasDefinePropertiesSupport()

Detects if a runtime environment supports Object.defineProperties.

var bool = hasDefinePropertiesSupport();
// returns <boolean>

Examples

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.' );
}

CLI

Usage

Usage: has-define-properties-support [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ has-define-properties-support
<boolean>
Did you find this page helpful?