Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.reflect.delete-property.js 566B

12345678910111213
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var anObject = require('../internals/an-object');
  4. var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
  5. // `Reflect.deleteProperty` method
  6. // https://tc39.es/ecma262/#sec-reflect.deleteproperty
  7. $({ target: 'Reflect', stat: true }, {
  8. deleteProperty: function deleteProperty(target, propertyKey) {
  9. var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
  10. return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
  11. }
  12. });