Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-generator-retail

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-generator-retail - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

6

esm/finalize.js

@@ -13,2 +13,8 @@ import { weightedBoolean } from './utils';

});
// set product sales
db.commands.forEach(function (command) {
command.basket.forEach(function (item) {
db.products[item.product_id].sales += item.quantity;
});
});
// add 'collector' group

@@ -15,0 +21,0 @@ var customersBySpending = db.commands.reduce(function (customers, command) {

5

esm/products.js

@@ -192,7 +192,8 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {

description: lorem.paragraph(),
stock: weightedBoolean(20)
stock: weightedBoolean(10)
? 0
: random.number({ min: 0, max: 250 }),
: random.number({ min: 0, max: 150 }),
sales: 0,
};
})); }, []);
});

@@ -15,2 +15,8 @@ "use strict";

});
// set product sales
db.commands.forEach(function (command) {
command.basket.forEach(function (item) {
db.products[item.product_id].sales += item.quantity;
});
});
// add 'collector' group

@@ -17,0 +23,0 @@ var customersBySpending = db.commands.reduce(function (customers, command) {

@@ -194,7 +194,8 @@ "use strict";

description: en_1.lorem.paragraph(),
stock: utils_1.weightedBoolean(20)
stock: utils_1.weightedBoolean(10)
? 0
: en_1.random.number({ min: 0, max: 250 }),
: en_1.random.number({ min: 0, max: 150 }),
sales: 0,
};
})); }, []);
});

2

package.json
{
"name": "data-generator-retail",
"version": "3.7.0",
"version": "3.8.0",
"homepage": "https://github.com/marmelab/react-admin/tree/master/examples/data-generator",

@@ -5,0 +5,0 @@ "bugs": "https://github.com/marmelab/react-admin/issues",

@@ -17,2 +17,9 @@ import { weightedBoolean } from './utils';

// set product sales
db.commands.forEach(command => {
command.basket.forEach(item => {
db.products[item.product_id].sales += item.quantity;
});
});
// add 'collector' group

@@ -19,0 +26,0 @@ const customersBySpending = db.commands.reduce((customers, command) => {

@@ -198,5 +198,6 @@ import { random, lorem } from 'faker/locale/en';

description: lorem.paragraph(),
stock: weightedBoolean(20)
stock: weightedBoolean(10)
? 0
: random.number({ min: 0, max: 250 }),
: random.number({ min: 0, max: 150 }),
sales: 0,
};

@@ -203,0 +204,0 @@ }),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc