How to use the neo-async.apply function in neo-async

To help you get started, we’ve selected a few neo-async 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 pirxpilot / postcss-cli / index.js View on Github external
Object.keys(commonOptions).forEach(function(opt) {
      options[opt] = commonOptions[opt];
    });

    processor
      .process(css, options)
      .then(function(result) { fn(null, result); })
      .catch(fn);
  }

  async.waterfall([
    async.apply(fs.readFile, input),
    doProcess,
    async.apply(dumpWarnings),
    async.apply(writeResult, output)
  ], fn);
}
github pirxpilot / postcss-cli / index.js View on Github external
from: input,
      to: output
    };

    Object.keys(commonOptions).forEach(function(opt) {
      options[opt] = commonOptions[opt];
    });

    processor
      .process(css, options)
      .then(function(result) { fn(null, result); })
      .catch(fn);
  }

  async.waterfall([
    async.apply(fs.readFile, input),
    doProcess,
    async.apply(dumpWarnings),
    async.apply(writeResult, output)
  ], fn);
}
github pirxpilot / postcss-cli / index.js View on Github external
function writeResult (name, content, fn) {
  var funcs = [
    async.apply(fs.writeFile, name, content.css)
  ];
  if (content.map) {
    funcs.push(async.apply(fs.writeFile, name + '.map', content.map.toString()));
  }
  async.parallel(funcs, fn);
}
github pirxpilot / postcss-cli / index.js View on Github external
};

    Object.keys(commonOptions).forEach(function(opt) {
      options[opt] = commonOptions[opt];
    });

    processor
      .process(css, options)
      .then(function(result) { fn(null, result); })
      .catch(fn);
  }

  async.waterfall([
    async.apply(fs.readFile, input),
    doProcess,
    async.apply(dumpWarnings),
    async.apply(writeResult, output)
  ], fn);
}
github pirxpilot / postcss-cli / index.js View on Github external
function writeResult (name, content, fn) {
  var funcs = [
    async.apply(fs.writeFile, name, content.css)
  ];
  if (content.map) {
    funcs.push(async.apply(fs.writeFile, name + '.map', content.map.toString()));
  }
  async.parallel(funcs, fn);
}