code: function setupMethods(classDef, methodsIn) {
    const methods = classDef.methods;
    Object.keys(methodsIn).forEach((methodName) => {
      if (!methods[methodName]) methods[methodName] = {};
      const methodDef = methods[methodName];
      const methodInDef = methodsIn[methodName];
      if (!methodDef.methodsBefore) {
        methodDef.methodsBefore = [];
        methodDef.methodLast = [];
        methodDef.methodsAfter = [];
        methodDef.methodsMiddle = [];
        methodDef.conditional = [];
      }
  
      if (typeof methodInDef === 'function') {
        methodDef.methodsMiddle.push(methodInDef);
      } else if (methodInDef.mode === registerComponent.MODES.BEFORE) {
        methodDef.methodsBefore.push(methodInDef.value);
      } else if (methodInDef.mode === registerComponent.MODES.AFTER) {
        methodDef.methodsAfter.push(methodInDef.value);
      } else if (methodInDef.mode === registerComponent.MODES.OVERWRITE) {
        methodDef.lock = methodInDef.value;
      } else if (methodInDef.mode === registerComponent.MODES.DEFAULT || methodInDef.value && !methodInDef.mode) {
        methodDef.methodsMiddle.push(methodInDef.value);
      } else if (methodInDef.mode === registerComponent.MODES.LAST) {
        methodDef.methodLast.push(methodInDef.value);
      }
      if (methodInDef.conditional) methodDef.conditional.push(methodInDef.conditional);
    });
  }
docs: /*
  Setup the Real structure needed for the `methods` object, not a hash of functions,
  but a hash of functions with a `mode` parameter