Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Update generateSet.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dangus21 committed Jan 7, 2022
1 parent d0ce517 commit d648cec
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions examples/node/generateSet.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require("fs");
const fs = require("fs");

var blaver = require("../../index");
const blaver = require("../../index");

// generate dataSet as example
fs.writeFile(
Expand All @@ -11,15 +11,11 @@ fs.writeFile(
}
);
// generate bigDataSet as example
var bigSet = [];

for (var i = 20; i >= 0; i--) {
bigSet.push(blaver.helpers.userCard());
}
const bigSet = Array.from({length: 20}, () => blaver.helpers.userCard());

fs.writeFile(
__dirname + "/bigDataSet.json",
JSON.stringify(bigSet),
JSON.stringify(bigSet, null, 2),
function () {
console.log("bigDataSet generated successfully!");
}
Expand Down

0 comments on commit d648cec

Please sign in to comment.