time-to-botec/js/node_modules/@stdlib/assert/has-define-property-support/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

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>