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 RemoteStoragePackage from 'remotestoragejs';
const RemoteStorage = RemoteStoragePackage.default || RemoteStoragePackage;
export const LCHStorageClientForModules = function (modules) {
let remoteStorage = new RemoteStorage({
modules: modules,
});
let outputData = {};
outputData.remoteStorage = remoteStorage;
modules.forEach(function (e) {
remoteStorage.access.claim(e.name, 'rw');
remoteStorage.caching.enable(`/${ e.name }/`);
outputData[e.name] = remoteStorage[e.name];