How to use the jsstore.Connection function in jsstore

To help you get started, we’ve selected a few jsstore 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 ujjwalguptaofficial / idbstudio / src / service / service_helper.ts View on Github external
import * as JsStore from 'jsstore';

const getWorkerPath = function () {
    if (process.env.NODE_ENV === 'development') {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js");
    }
    else {
        return require("file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.ie.js");
    }
};

export class ServiceHelper {
    static idbCon = new JsStore.Connection(new Worker(getWorkerPath()));
}

(window as any).con = ServiceHelper.idbCon;

jsstore

Harness the power of JsStore to streamline database operations in your web applications. With its SQL-like API, JsStore simplifies IndexedDB interactions, enabling developers to easily query, filter, and manipulate data with familiar syntax and efficiency

MIT
Latest version published 1 month ago

Package Health Score

71 / 100
Full package analysis