var Faker = require('faker');

/**
 * Generates an array of objects of fake data based off of the props
 * @method generateFakeData
 * @param {Object{ name(propertyName), type(type of data to create) }} props 
 * @param {Number} count 
 */

function generateFakeData(props, count, localization) {
  if(localization) {
    Faker.locale = localization;
  }
  var resultArr = []
  for(var index = 0; index < count; index++) {
    var newObj = {};
    props.forEach((prop) => {
      if(typeof(prop.type) === 'function') {
        newObj[prop.name] = prop.type(index, prop);
      }
      else if(prop.type !== undefined){
        newObj[prop.name] = Faker.fake(`${prop.type}`);
      }
      else {
        newObj[prop.name] = `${prop.name}${index}`;
      };
    });
    resultArr.push(newObj);
  }
  return resultArr;
}

module["exports"] = generateFakeData
@@ -445,31 +445,35 @@
     
-props.forEach((prop) =%3E
+for(var propIndex in props)
  %7B%0A 
@@ -655,19 +655,16 @@
 er.fake(
-%60$%7B
 prop.typ
@@ -664,18 +664,16 @@
 rop.type
-%7D%60
 );%0A     
@@ -720,11 +720,8 @@
 %5D = 
-%60$%7B
 prop
@@ -729,18 +729,14 @@
 name
-%7D$%7B
++
 index
-%7D%60
 ;%0A  
@@ -747,17 +747,16 @@
 %7D;%0A    %7D
-)
 ;%0A    re

Remove es6 dependency on faker-data