From 489e855170553876ff580ec623ef2eea1b4b9657 Mon Sep 17 00:00:00 2001 From: Matias Date: Wed, 24 Apr 2019 13:28:42 -0300 Subject: [PATCH] Adding pad function --- MultiPeriodDaily.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MultiPeriodDaily.js b/MultiPeriodDaily.js index 884f53e4a..6fa20d855 100644 --- a/MultiPeriodDaily.js +++ b/MultiPeriodDaily.js @@ -379,7 +379,7 @@ periodsControlLoop(); return; } - } + } let dependencyIndex = 0; dataFiles = []; @@ -772,4 +772,9 @@ callBackFunction(global.DEFAULT_FAIL_RESPONSE); } } + + function pad(str, max) { + str = str.toString(); + return str.length < max ? pad(" " + str, max) : str; + } };