Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import store from '../services/store.js';
import gui from 'nw.gui';
import Datastore from 'nedb';
import path from 'path';
let datapath = gui.App.dataPath + '/nedb';
let currentFavorite = null;
let Favorite = store.defineResource({
name: 'favorite',
afterInject() {
Favorite.emit('change');
},
afterEject() {
Favorite.emit('change');
},
afterUpdate(Favorite, favorite, cb) {
Favorite.emit('change');
cb(null, favorite);
},
afterCreate(Favorite, favorite, cb) {
Favorite.set(favorite);
import nwGui from "nw.gui";
export default nwGui;
export const App = nwGui.App;
export const Clipboard = nwGui.Clipboard;
export const Menu = nwGui.Menu;
export const MenuItem = nwGui.MenuItem;
export const Screen = nwGui.Screen;
export const Shell = nwGui.Shell;
export const Shortcut = nwGui.Shortcut;
export const Tray = nwGui.Tray;
export const Window = nwGui.Window;