File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { Store , Writer } from 'n3' ;
1+ import { Prefixes , Store , Writer } from 'n3' ;
22import { parse , stringify } from 'node:querystring' ;
3+ import { NamedNode } from '@rdfjs/types' ;
34
45/**
56 * Converts a x-www-form-urlencoded string to a JSON object.
@@ -48,8 +49,8 @@ export function isIri(input: string): boolean {
4849/**
4950 * Write an N3 store to a string (in turtle format)
5051 */
51- export async function writeStore ( store : Store ) : Promise < string > {
52- const writer = new Writer ( { format : 'text/turtle' } ) ;
52+ export async function writeStore ( store : Store , prefixes : Prefixes < NamedNode | string > = { } ) : Promise < string > {
53+ const writer = new Writer ( { format : 'text/turtle' , prefixes } ) ;
5354 writer . addQuads ( store . getQuads ( null , null , null , null ) ) ;
5455
5556 return new Promise < string > ( ( resolve , reject ) => {
You can’t perform that action at this time.
0 commit comments