Bluebird. Then method
There is sample code in the Bluebird docs for the .call method labeled "Lo-dash chaining or underscore methods".
What is the purpose of chained .then(_)
in the code snippet below?
var Promise = require("bluebird");
...
var _ = require("lodash");
var fs = Promise.promisifyAll(require("fs"));
fs.readdirAsync(".").then(_) <-- ???
.call("groupBy", function(fileName) {
return fileName.charAt(0);
})
...
Thank!
+3
source to share
1 answer