genData is coded to support several environments, which reduces the optimum performance in all of them.
A build system should be established which allows configuring genData for AMD, Node, and browser environments separately, or any combination.
Ideally the build system would use the Node environment - to keep things in JavaScript. A command line prompt may be considered along with an npm script name, with interactive prompts.