Use a pattern along these lines:
function getValue(file) {
return lookupValue(file);
}
getValue('myFile.txt').then(function(res) {
// do whatever with res here
});
(although this is a bit redundant, I'm sure your actual code is more complicated)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…