UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

26 lines 770 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.df2quads = df2quads; const quads_1 = require("../../util/quads"); const edge_1 = require("./edge"); /** * @see cfg2quads * @see serialize2quads * @see graph2quads */ function df2quads(graph, config) { return (0, quads_1.graph2quads)({ rootIds: [...graph.rootIds()], vertices: [...graph.vertices(true)] .map(([id, v]) => ({ ...v, id })), edges: [...graph.edges()].flatMap(([fromId, targets]) => [...targets].map(([toId, info]) => ({ from: fromId, to: toId, type: [...(0, edge_1.edgeTypesToNames)(info.types)], }))) }, config); } //# sourceMappingURL=quads.js.map