stockshark-drive-local
Advanced tools
Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "stockshark-drive-local", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Local Drive for StockShark", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -36,7 +36,3 @@ const path = require('path') | ||
this.checkRootFolder() | ||
console.log("loadTextFileLastLine", 1) | ||
const filePath = path.resolve(this.currentFolderPath, fileName) | ||
console.log("loadTextFileLastLine", 2) | ||
if (!fs.pathExistsSync(filePath)) { | ||
@@ -46,24 +42,22 @@ return null | ||
// return new Promise((resolve, reject) => { | ||
// const stream = readline.createInterface({ | ||
// input: fs.createReadStream(filePath), | ||
// crlfDelay: Infinity, | ||
// }); | ||
return new Promise((resolve, reject) => { | ||
const stream = readline.createInterface({ | ||
input: fs.createReadStream(filePath), | ||
crlfDelay: Infinity, | ||
}); | ||
// let lastLine = ''; | ||
let lastLine = ''; | ||
// stream.on('line', (line) => { | ||
// lastLine = line; | ||
// }); | ||
stream.on('line', (line) => { | ||
lastLine = line; | ||
}); | ||
// stream.on('close', () => { | ||
// resolve(lastLine); | ||
// }); | ||
stream.on('close', () => { | ||
resolve(lastLine); | ||
}); | ||
// stream.on('error', (err) => { | ||
// reject(err); | ||
// }); | ||
// }); | ||
console.log("loadTextFileLastLine", 3) | ||
return null | ||
stream.on('error', (err) => { | ||
reject(err); | ||
}); | ||
}); | ||
} | ||
@@ -70,0 +64,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4457
111