How to use the electron-json-storage.remove function in electron-json-storage

To help you get started, we’ve selected a few electron-json-storage 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 Dispersionjs / Dispersion / renderer.js View on Github external
exec(pinRmCommand, function(error, stdout, stderr) {
    storage.remove(pinHash, function(error) {
      hashList();
      if (error) throw error;
    });
    if (error !== null) {
      console.log('exec error: ' + error);
    }
  })
}
github Toinane / colorpicker / src / storage.js View on Github external
let reset = () => {
  electronStorage.remove('colorpicker')
  storage = defaultStorage
  save()
}
github phodal / phodit / src / native / main.ts View on Github external
function openPath(pathName: any, isWatch = false) {
  checkWindow();

  storage.set("storage.last.path", {file: pathName});
  storage.remove("storage.last.file");

  let dirFiles: any[] = [];
  if (!isWatch) {
    chokidar
      .watch(pathName, {ignored: /(^|[\/\\])\../})
      .on("unlink", () => {
        reloadPath(true);
      })
      .on("add", () => {
        reloadPath(true);
      });
  }

  fs.readdir(pathName, (err, files) => {
    dirFiles = dirTree(pathName);
github web-pal / chronos-timetracker / app / renderer / sagas / helpers.js View on Github external
new Promise((resolve, reject) => {
    storage.remove(key, (err) => {
      if (err) {
        reject(new Error(`Error removing from storage: ${err}`));
      }
      resolve();
    });
  })
);
github willyb321 / media_mate / app / renderjs / viewer.js View on Github external
fs.remove(pathParsed.dir, err => {
							if (err) {
								Raven.captureException(err);
								Raven.showReportDialog();
							}
							storage.remove(storename, err => {
								if (err) {
									Raven.captureException(err);
									Raven.showReportDialog();
								}
							});
							db.remove({_id: `img${elem.getAttribute('data-store-name')}`}, {}, (err, numRemoved) => {
								if (err) {
									Raven.captureException(err);
									Raven.showReportDialog();
								}
								log.info(`VIEWER: removed ${numRemoved} from DB`);
							});
							elem.parentNode.removeChild(elem);
						});
					}, dismiss => {
github matthewgonzalez / what-the-port / src / checkupdates.js View on Github external
}, response => {
    if (response === 0) {
      shell.openExternal('https://matthewgonzalez.github.io/what-the-port/')
    } else if (response === 1) {
      storage.remove('ignoreVersion')
    } else if (response === 2) {
      storage.set('ignoreVersion', update.tag_name)
    }
  })
}
github willyb321 / media_mate / app / renderjs / viewer.js View on Github external
const time = 0;
		const duration = data.duration;
		const percent = (time / duration) * 100;
		figcap[1].style.width = percent + '%';
		figcap[1].style.zIndex = 9999;
		figcap[1].style.position = 'relative';
		figcap[1].style.top = '0';
		figcap[1].style.marginTop = '0px';
		figcap[1].style.marginBottom = '0px';
		figcap[1].style.setProperty('margin', '0px 0px', 'important');
		figcap[1].style.backgroundColor = 'red';
		figcap[1].style.width = '0px';
		figcap[2].innerText = `${figcap[0].title}`;
		log.info(`VIEWER: Reset watched time for ${filename}`);
	});
	storage.remove(filename, err => {
		if (err) {
			Raven.captureException(err);
			Raven.showReportDialog();
		}
	});
}
github trazyn / ieaseMusic / common / storage.js View on Github external
return new Promise((resolve, reject) => {
            storage.remove(key, err => {
                if (err) {
                    reject(err);
                } else {
                    resolve();
                }
            });
        });
    }