data-generator-retail
Advanced tools
Comparing version 2.8.5 to 2.9.3
@@ -39,5 +39,5 @@ import { random } from 'faker/locale/en'; | ||
status: status, | ||
returned: status == 'delivered' ? weightedBoolean(10) : false, | ||
returned: status === 'delivered' ? weightedBoolean(10) : false, | ||
}; | ||
}); | ||
}); |
@@ -21,3 +21,3 @@ import { weightedBoolean } from './utils'; | ||
}, {}); | ||
Object.keys(customersBySpending).map(function (customer_id) { | ||
Object.keys(customersBySpending).forEach(function (customer_id) { | ||
if (customersBySpending[customer_id].nbProducts > 10) { | ||
@@ -29,3 +29,3 @@ db.customers[customer_id].groups.push('collector'); | ||
db.customers | ||
.filter(function (customer) { return customer.nb_commands == 1; }) | ||
.filter(function (customer) { return customer.nb_commands === 1; }) | ||
.forEach(function (customer) { return customer.groups.push('ordered_once'); }); | ||
@@ -32,0 +32,0 @@ // add 'compulsive' group |
@@ -44,5 +44,5 @@ "use strict"; | ||
status: status, | ||
returned: status == 'delivered' ? utils_1.weightedBoolean(10) : false, | ||
returned: status === 'delivered' ? utils_1.weightedBoolean(10) : false, | ||
}; | ||
}); | ||
}); |
@@ -23,3 +23,3 @@ "use strict"; | ||
}, {}); | ||
Object.keys(customersBySpending).map(function (customer_id) { | ||
Object.keys(customersBySpending).forEach(function (customer_id) { | ||
if (customersBySpending[customer_id].nbProducts > 10) { | ||
@@ -31,3 +31,3 @@ db.customers[customer_id].groups.push('collector'); | ||
db.customers | ||
.filter(function (customer) { return customer.nb_commands == 1; }) | ||
.filter(function (customer) { return customer.nb_commands === 1; }) | ||
.forEach(function (customer) { return customer.groups.push('ordered_once'); }); | ||
@@ -34,0 +34,0 @@ // add 'compulsive' group |
{ | ||
"name": "data-generator-retail", | ||
"version": "2.8.5", | ||
"version": "2.9.3", | ||
"homepage": "https://github.com/marmelab/react-admin/tree/master/examples/data-generator", | ||
@@ -22,3 +22,3 @@ "bugs": "https://github.com/marmelab/react-admin/issues", | ||
}, | ||
"gitHead": "603c825272972e0691299b1981048588faea2e21" | ||
"gitHead": "c48ead76765798e2a0917baaaaff89c165d98e98" | ||
} |
@@ -61,5 +61,5 @@ import { random } from 'faker/locale/en'; | ||
status: status, | ||
returned: status == 'delivered' ? weightedBoolean(10) : false, | ||
returned: status === 'delivered' ? weightedBoolean(10) : false, | ||
}; | ||
}); | ||
}; |
@@ -25,3 +25,3 @@ import { weightedBoolean } from './utils'; | ||
}, {}); | ||
Object.keys(customersBySpending).map(customer_id => { | ||
Object.keys(customersBySpending).forEach(customer_id => { | ||
if (customersBySpending[customer_id].nbProducts > 10) { | ||
@@ -34,3 +34,3 @@ db.customers[customer_id].groups.push('collector'); | ||
db.customers | ||
.filter(customer => customer.nb_commands == 1) | ||
.filter(customer => customer.nb_commands === 1) | ||
.forEach(customer => customer.groups.push('ordered_once')); | ||
@@ -37,0 +37,0 @@ |
@@ -1,5 +0,1 @@ | ||
import { random, lorem } from 'faker/locale/en'; | ||
import subDays from 'date-fns/sub_days'; | ||
import { randomDate } from './utils'; | ||
export default (db, { serializeDate }) => { | ||
@@ -6,0 +2,0 @@ let id = 0; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44233
997