[add] trigger download format
This commit is contained in:
@@ -25,8 +25,10 @@ class RawTrigger {
|
||||
for (let startPos = 0; startPos < transformDataArr.length; startPos += step) {
|
||||
// array chunking algo. comparison: https://www.better.dev/javascript-algorithms-array-chunking
|
||||
let temp = transformDataArr.slice(startPos, startPos + step)
|
||||
temp[0] = new Date(parseInt(temp[0]))
|
||||
const date = new Date(parseInt(temp[0]))
|
||||
temp[0] = date
|
||||
temp[1] = parseInt(temp[1]) + 1
|
||||
temp.splice(1, 0, [date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()].join(':'))
|
||||
transformData += (temp.join() + '\n') // join: https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Array/join
|
||||
}
|
||||
callback(null, transformData)
|
||||
|
||||
Reference in New Issue
Block a user