Halfway through in refactoring the report generation to a separate process running asynchronously of the Express server.

This commit is contained in:
Tomas Bures 2017-04-17 18:31:01 -04:00
parent 2056645023
commit e7d12f1dbc
10 changed files with 319 additions and 206 deletions

14
lib/fs-tools.js Normal file
View file

@ -0,0 +1,14 @@
'use strict';
module.exports = {
nameToFileName,
};
function nameToFileName(name) {
return name.
trim().
toLowerCase().
replace(/[ .+/]/g, '-').
replace(/[^a-z0-9\-_]/gi, '').
replace(/--*/g, '-');
}