Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function chargeLRS(statements: Statement[] = [], subject: SomeNode): TestContext {
const store = new RDFStore();
const schema = new Schema(store);
const mapping = new ComponentStoreTestProxy(schema);
const lrs = new LinkedRenderStore({ mapping, schema, store });
store.addStatements(statements);
store.flush();
return {
contextProps: (topology?: TopologyContextType): LinkContext & LinkCtxOverrides => ({
lrs,
subject,
subjectCtx: subject,
topology,
topologyCtx: topology,
}),
lrs,
mapping,