Added seed file for test data.

This commit is contained in:
2020-02-27 00:38:11 +01:00
parent bb2fe82c84
commit 97cf5b2b6b
10 changed files with 220 additions and 71 deletions

View File

@@ -161,6 +161,11 @@ const { argv } = yargs
describe: 'Show error stack traces',
type: 'boolean',
default: process.env.NODE_ENV === 'development',
})
.option('dummy', {
describe: 'Generate dummy data during seed',
type: 'boolean',
default: false,
});
module.exports = argv;

5
src/utils/pick-random.js Normal file
View File

@@ -0,0 +1,5 @@
function pickRandom(array) {
return array[Math.floor(Math.random() * array.length)];
}
module.exports = pickRandom;