UNPKG

@solid-data-modules/rdflib-utils

Version:

Utility functions for the development of Solid Data Modules for RDFLib.js

18 lines 630 B
/** * Applies the described updates to a Pod * @param fetcher - The fetcher to use for the update * @param updater - The updater to use for the update * @param operation - The operations to perform */ export async function executeUpdate(fetcher, updater, operation) { await updater.updateMany(operation.deletions, operation.insertions); operation.filesToCreate.map((file) => { createEmptyTurtleFile(fetcher, file.url); }); } function createEmptyTurtleFile(fetcher, url) { return fetcher.webOperation("PUT", url, { contentType: "text/turtle", }); } //# sourceMappingURL=executeUpdate.js.map