let AwaitLoad = async (item, config) =>
let Load = async (item, config) =>
{
await new Promise((resolve, reject) =>
{
let link = "URL";
Request.get(link, {timeout: 5 * second}, (err, response, body) =>
{
if(err)
{
reject(err);
}
else
{
resolve(body);
}
});
});
};
let AwaitLoad = async (item, config) =>
{
return Load(item, config);
};
Info.forEach(item =>
{
let result = await AwaitSteam(item, config);
console.log(result);
});
let result = await AwaitLoad(item, config);
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3