Sha256: d5432765a4a542d14f729becc155ca835ce19035316d09d917e391178daf3574

Contents?: true

Size: 763 Bytes

Versions: 320

Compression:

Stored size: 763 Bytes

Contents

// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP          = require('./_object-dp')
  , $export     = require('./_export')
  , anObject    = require('./_an-object')
  , toPrimitive = require('./_to-primitive');

// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * require('./_fails')(function(){
  Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
  defineProperty: function defineProperty(target, propertyKey, attributes){
    anObject(target);
    propertyKey = toPrimitive(propertyKey, true);
    anObject(attributes);
    try {
      dP.f(target, propertyKey, attributes);
      return true;
    } catch(e){
      return false;
    }
  }
});

Version data entries

320 entries across 8 versions & 3 rubygems

Version Path
affiliator-0.2.1 node_modules/core-js/library/modules/es6.reflect.define-property.js
affiliator-0.2.1 node_modules/core-js/modules/es6.reflect.define-property.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/modules/es6.reflect.define-property.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/library/modules/es6.reflect.define-property.js
lanes-0.8.0 node_modules/babel-runtime/node_modules/core-js/modules/es6.reflect.define-property.js
lanes-0.8.0 node_modules/babel-register/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-hoist-variables/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-define-map/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-function-name/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-get-function-arity/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-helper-call-delegate/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-core/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/library/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-code-frame/node_modules/core-js/modules/es6.reflect.define-property.js
babel-schmooze-sprockets-0.1.3 node_modules/babel-generator/node_modules/core-js/library/modules/es6.reflect.define-property.js