UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

23 lines 889 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.internalPrinter = internalPrinter; exports.printStepResult = printStepResult; const assert_1 = require("../../util/assert"); /** * Helper function to support the {@link Internal} format, as it is simply returning the input. * * @see IPipelineStepPrinter */ function internalPrinter(input) { return input; } /** * For a `step` of the given name, which returned the given `data`. Convert that data into the given `format`. * Depending on your step and the format this may require `additional` inputs. */ function printStepResult(step, data, format, ...additional) { const printer = step.printer[format]; (0, assert_1.guard)(printer !== undefined, `printer for ${step.name} does not support ${String(format)}`); return printer(data, ...additional); } //# sourceMappingURL=print.js.map