Permalink
Cannot retrieve contributors at this time
37 lines (30 sloc)
863 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/AsyncSeriesHook.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 AsyncSeriesHookCodeFactory extends HookCodeFactory { | |
content({ onError, onDone }) { | |
return this.callTapsSeries({ | |
onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), | |
onDone | |
}); | |
} | |
} | |
const factory = new AsyncSeriesHookCodeFactory(); | |
const COMPILE = function(options) { | |
factory.setup(this, options); | |
return factory.create(options); | |
}; | |
function AsyncSeriesHook(args = [], name = undefined) { | |
const hook = new Hook(args, name); | |
hook.constructor = AsyncSeriesHook; | |
hook.compile = COMPILE; | |
hook._call = undefined; | |
hook.call = undefined; | |
return hook; | |
} | |
AsyncSeriesHook.prototype = null; | |
module.exports = AsyncSeriesHook; |