var and = require('101/and');
and(true, false); // false
and(true, true); // true
I'm not convinced that there's a real need for that. Anyone else have a good use for something like that? Looks like it doesn't even take more than two arguments
and(true, false); // false
and(true, true); // true
I'm not convinced that there's a real need for that. Anyone else have a good use for something like that? Looks like it doesn't even take more than two arguments
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var and = require('101/and');
var paths = [...];
Promise.map(paths, fs.existsAsync).reduce(and)
.then(function(allExist) {
if (allExist) console.log('all paths exist');
});