From cfb4a0707873316ff4a3e036efe7cfa6e728e313 Mon Sep 17 00:00:00 2001 From: Ganesh Annan Date: Sun, 24 Nov 2024 13:46:09 +0100 Subject: [PATCH] Allow caller to override `rdfDirection`. --- lib/canonicalize.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/canonicalize.js b/lib/canonicalize.js index 947d801..744340f 100644 --- a/lib/canonicalize.js +++ b/lib/canonicalize.js @@ -65,10 +65,9 @@ export async function canonicalize(input, options) { }; if(typeof input !== 'string') { const opts = { - ...options, produceGeneralizedRdf: false, rdfDirection: 'i18n-datatype' + rdfDirection: 'i18n-datatype', ...options, produceGeneralizedRdf: false, }; delete opts.format; - opts.produceGeneralizedRdf = false; input = await jsonld.toRDF(input, opts); } return rdfCanonize.canonize(input, options);