var _ = require("lodash");

var CreateClass = function(initFunction, memberMap) {
  _.forOwn(memberMap, function(value, key) {
    initFunction.prototype[key] = value;
  });
  return initFunction;
}

var CreateSubClass = function(baseKlass, initFunction, memberMap) {
  initFunction.prototype = Object.create(baseKlass.prototype);
  initFunction.prototype.constructor = initFunction;
  _.forOwn(memberMap, function(value, key) {
    initFunction.prototype[key] = value;
  });
  return initFunction;
}

module.exports = {
  CreateClass: CreateClass,
  CreateSubClass: CreateSubClass
}

var CreateClass = function(initFunction, memberMap) {
  for (mem in memberMap) {
    if (memberMap.hasOwnProperty(mem)) {
      initFunction.prototype[mem] = memberMap[mem];
    }
  }
  return initFunction;
}

var CreateSubClass = function(baseKlass, initFunction, memberMap) {
  initFunction.prototype = Object.create(baseKlass.prototype);
  initFunction.prototype.constructor = initFunction;
  for (mem in memberMap) {
    if (memberMap.hasOwnProperty(mem)) {
      initFunction.prototype[mem] = memberMap[mem];
    }
  }
  return initFunction;
}

module.exports = {
  CreateClass: CreateClass,
  CreateSubClass: CreateSubClass
}

Revert "Converted memberMap traversal to use lodash"
Revert "Converted memberMap traversal to use lodash"

This reverts commit 0335b3960c8e6b9436973d0e8163d549178a179c.
