3.3.0 • Published 4 years ago

single-market-robot-simulator-savezip v3.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

single-market-robot-simulator-savezip

Saves the configuration and logs of an array of single-market-robot-simulator Simulations, in a zip file using jszip and filesaver.js-npm.

Used by robot-trading-webapp

Useful only on the browser.

On a node.js server, single-market-robot-simulator automatically saves multiple csv files without this module.

Installation

npm i single-market-robot-simulator-savezip -S

Usage

This module exports a single function,

 const saveZip = require('single-market-robot-simulator-savezip');

where

 saveZip({Array of single-market-robot-simulator.Simulation} sims, callback)

calls

callback(blob), where blob is a representation of zipped folder data for the simulations,

or without a callback, returns nothing, and asynchronously exports a .zip file from browser-memory, particularly an array of multiple single-market-robot-simulator,Simulations is exported as a .zip file containing a directory for each Simulation, with files for the Simulatin config.json and data logs in .csv format.

Example (from robot-trading-webapp: main.js)

 const saveZip    = require('single-market-robot-simulator-savezip');
 ...
 app.downloadData = function(){
     $('#downloadButton').prop('disabled',true);
 setTimeout(function(){
          $('#downloadButton').prop('disabled',false);
     }, 60*1000);
     saveZip(sims);
 };
 ...
 $('#downloadButton').click(app.downloadData);

###Copyright

2016 Paul Brewer Economic and Financial Technology Consulting LLC

###License

MIT License

3.3.0

4 years ago

3.2.0

4 years ago

3.1.1

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

7 years ago

1.0.0

7 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago