0
request(source_url).pipe(async.series([
function() {
fs.createWriteStream(path_for_downloads + path.basename(source_url));
},
function() {
done(null);
}
]);
);
它等待未閉合支架...爲什麼async.series在下面的代碼中不能在REPL中工作?
... );
...
這工作:
async.series([
function() {
fs.createWriteStream(path_for_downloads + path.basename(source_url));
},
function() {
done(null);
}
]);