Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as JsStore from 'jsstore';
import * as SqlWeb from "sqlweb";
const getWorkerPath = () => {
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.min.js");
}
};
JsStore.useSqlWeb(SqlWeb);
// This will ensure that we are using only one instance.
// Otherwise due to multiple instance multiple worker will be created.
const workerPath = getWorkerPath();
const worker = new Worker(workerPath);
export const con = new JsStore.Instance(worker);
import * as JsStore from 'jsstore';
import * as SqlWeb from "sqlweb";
const getWorkerPath = () => {
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.min.js");
}
};
JsStore.useSqlWeb(SqlWeb);
// This will ensure that we are using only one instance.
// Otherwise due to multiple instance multiple worker will be created.
const workerPath = getWorkerPath();
const worker = new Worker(workerPath);
export const idbCon = new JsStore.Instance(worker);
import * as SqlWeb from 'sqlweb';
import * as JsStore from 'jsstore';
import * as workerPath from "file-loader?name=scripts/[name].[hash].js!jsstore/dist/jsstore.worker.js";
JsStore.useSqlWeb(SqlWeb);
// This will ensure that we are using only one instance.
// Otherwise due to multiple instance multiple worker will be created.
export const con = new JsStore.Instance(new Worker(workerPath));