Halfway through in refactoring the report generation to a separate process running asynchronously of the Express server.
This commit is contained in:
parent
2056645023
commit
e7d12f1dbc
10 changed files with 319 additions and 206 deletions
14
lib/fs-tools.js
Normal file
14
lib/fs-tools.js
Normal 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, '-');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue