News for hackers. Stuff that matters.
Re:101 – A JavaScript utility library by noisysocks on Monday November 24, 2014 @11:43PM (#8656373)
A silly example:

  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');
    });

There are no comments on this comment yet.