How to use the electron-json-storage.clear 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 eNkru / electron-xiami / src / controller / app-tray-controller.js View on Github external
cleanupAndExit() {
    storage.clear((error) => {
      if (error) throw error;
      // console.log(app.getPath('userData'));
      app.exit(0);
    });
  }
}
github storj / storjspace / app / src / renderer / vuex / modules / users.js View on Github external
logout ({ commit }) {
    commit(types.LOGOUT_USER_REQUEST)
    storage.clear((err) => {
      commit(types.LOGOUT_USER_SUCCESS)
      if (err) console.log(`Error clearing storage: ${err}`)
      router.push('/')
    })
  },
github web-pal / chronos-timetracker / app / renderer / sagas / helpers.js View on Github external
new Promise((resolve, reject) => {
    storage.clear((err) => {
      if (err) {
        reject(new Error('Error clear storage'));
      }
      resolve();
    });
  })
);