How to use the do.combo function in do

To help you get started, we’ve selected a few do examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github creationix / node-blog / build.js View on Github external
)(function (authors, articles, templates) {
    var group = Do.combo(function() {
      next("Done!\n" + Array.prototype.map.call(arguments, function (args) {
        return args[0] + " - " + args[1];
      }).join("\n"))
    });

    function write_file(filename, content) {
      var cb = group.add();
      fs.writeFile(filename, content)(function () {
        cb(new Date(), "  Wrote " + content.length + " bytes to " + filename);
      }, error_handler);
    }

    var Helpers = {
      github: function (name) {
        return "http://github.com/" + name;
      },

do

The simplest way to manage asynchronicity

MIT
Latest version published 9 months ago

Package Health Score

59 / 100
Full package analysis