Sha256: 565dd1a51d9bf3d5a4a4382b5785cc8f017182032ab246bceb95f56a8f6b2cd9

Contents?: true

Size: 800 Bytes

Versions: 82

Compression:

Stored size: 800 Bytes

Contents

export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
  var desc = {};
  Object.keys(descriptor).forEach(function (key) {
    desc[key] = descriptor[key];
  });
  desc.enumerable = !!desc.enumerable;
  desc.configurable = !!desc.configurable;

  if ('value' in desc || desc.initializer) {
    desc.writable = true;
  }

  desc = decorators.slice().reverse().reduce(function (desc, decorator) {
    return decorator(target, property, desc) || desc;
  }, desc);

  if (context && desc.initializer !== void 0) {
    desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
    desc.initializer = undefined;
  }

  if (desc.initializer === void 0) {
    Object.defineProperty(target, property, desc);
    desc = null;
  }

  return desc;
}

Version data entries

82 entries across 81 versions & 12 rubygems

Version Path
tang-0.1.0 spec/tang_app/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
tang-0.0.9 spec/tang_app/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
trusty-cms-4.1.6 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
trusty-cms-4.1.5 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
enju_library-0.3.8 spec/dummy/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.3 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.2 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.1 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.12 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.11 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.10 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.9 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.8 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
jester-data-8.0.0 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
ezii-os-5.2.1 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
ezii-os-2.0.1 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
ezii-os-1.1.0 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
ezii-os-1.0.0 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
condenser-0.0.7 lib/condenser/processors/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js
ezii-os-0.0.0.1.0 node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js