How to use the link-lib.LinkedRenderStore function in link-lib

To help you get started, we’ve selected a few link-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fletcher91 / link-redux / test / fixtures.ts View on Github external
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,
        schema,
        store,
        subject,