Skip to content

Commit

Permalink
Merge branch 'main' into wip/remove-univeral-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr authored Dec 13, 2023
2 parents e014d9d + cb25776 commit 996fb30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rdfjs.internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import RdfJsDataFactory from "@rdfjs/data-model";
import { DataFactory } from "n3";
import type * as RdfJs from "@rdfjs/types";
import type {
BlankNodeId,
Expand All @@ -39,7 +39,7 @@ import type { ToRdfJsOptions } from "./rdfjs";
import type { IriString } from "./interfaces";
import { xmlSchemaTypes } from "./datatypes";

export const DataFactory = RdfJsDataFactory;
export { DataFactory };

type QuadParseOptions = Partial<{
otherQuads: RdfJs.Quad[];
Expand Down Expand Up @@ -356,7 +356,7 @@ export function toRdfJsQuads(
options: ToRdfJsOptions = {},
): RdfJs.Quad[] {
const quads: RdfJs.Quad[] = [];
const dataFactory = options.dataFactory ?? RdfJsDataFactory;
const dataFactory = options.dataFactory ?? DataFactory;

Object.keys(dataset.graphs).forEach((graphIri: IriString) => {
const graph = dataset.graphs[graphIri];
Expand Down Expand Up @@ -386,7 +386,7 @@ export function subjectToRdfJsQuads(
options: ToRdfJsOptions = {},
): RdfJs.Quad[] {
const quads: RdfJs.Quad[] = [];
const dataFactory = options.dataFactory ?? RdfJsDataFactory;
const dataFactory = options.dataFactory ?? DataFactory;

Object.keys(predicates).forEach((predicateIri) => {
const predicateNode = dataFactory.namedNode(predicateIri);
Expand Down

0 comments on commit 996fb30

Please sign in to comment.