How to use the run-series.bind function in run-series

To help you get started, we’ve selected a few run-series 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 uber-archive / idl / test / thrift-store.js View on Github external
}, function t(cluster, assert) {

    var tasks = Object.keys(cluster.remoteRepos).map(makePublishThunk);

    function makePublishThunk(remoteKey) {
        return function publishThunk(callback) {
            var cwd = path.join(cluster.remotesDir, remoteKey);
            cluster.thriftStorePublish(cwd, callback);
        };
    }

    series([
        series.bind(null, tasks),
        cluster.inspectUpstream.bind(cluster)
    ], onResults);

    function onResults(err, results) {
        if (err) {
            assert.ifError(err);
        }

        var upstream = results[1];

        Object.keys(cluster.remoteRepos).forEach(testPublish);

        function testPublish(key) {
            var filepath = 'thrift/github.com/org/' + key.toLowerCase() +
                '/service.thrift';
            assert.equal(
github uber / npm-shrinkwrap / sync / force-install.js View on Github external
var inCorrectTasks = incorrects.map(function (incorrect) {
            var name = incorrect.name;
            var folder = path.join(nodeModules,
                name, 'node_modules');

            return series.bind(null, [
                installModule.bind(
                    null, nodeModules, incorrect, opts),
                forceInstall.bind(null, folder, incorrect, opts)
            ]);
        });
        var correctTasks = corrects.map(function (correct) {

run-series

Run an array of functions in series

MIT
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis

Popular run-series functions