Permalink
Cannot retrieve contributors at this time
37 lines (30 sloc)
877 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/tapable/lib/AsyncParallelHook.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License http://www.opensource.org/licenses/mit-license.php | |
Author Tobias Koppers @sokra | |
*/ | |
"use strict"; | |
const Hook = require("./Hook"); | |
const HookCodeFactory = require("./HookCodeFactory"); | |
class AsyncParallelHookCodeFactory extends HookCodeFactory { | |
content({ onError, onDone }) { | |
return this.callTapsParallel({ | |
onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), | |
onDone | |
}); | |
} | |
} | |
const factory = new AsyncParallelHookCodeFactory(); | |
const COMPILE = function(options) { | |
factory.setup(this, options); | |
return factory.create(options); | |
}; | |
function AsyncParallelHook(args = [], name = undefined) { | |
const hook = new Hook(args, name); | |
hook.constructor = AsyncParallelHook; | |
hook.compile = COMPILE; | |
hook._call = undefined; | |
hook.call = undefined; | |
return hook; | |
} | |
AsyncParallelHook.prototype = null; | |
module.exports = AsyncParallelHook; |