<commit_before>const Ned = require('nedb');

const work = new Ned({
    filename: `assets/data/time.manager.work.db`,
    timestampData: true
});
console.log(work.filename)

const menu = new Ned({
    filename: `assets/data/time.manager.menu.db`
})

work.loadDatabase(err => {
    console.error('Work Error: ', err);
})

menu.loadDatabase(err => {
    if (err) return console.error('Menu Error: ', err)
    menu.insert([{
        label: 'File',
        accelerator: 'CmdOrCtrl+R',
        click (item, focusedWindow) {
        focusedWindow.loadUrl(__dirname + '/index.html');
        }
    },{
        label: 'Close Window',
        accelerator: 'CmdOrCtrl+W',
        click(item, focusedWindow) {
            focusedWindow.close();
        }
        },{
        label: 'Quit',
        accelerator: 'CmdOrCtrl+Q',
        click(item, focusedWindow) {
            app.quit();
        }
        }], (err, doc) => {
            if (err) return console.log('Menu Seed Error: ', err);
            if (doc) console.log(doc)
        })
})
<commit_msg>working menu seed<commit_after>const Database = require('../../src/dataBase.js');
const db = new Database('time.manager', ['menu', 'work']);
const { MenuItem } = require('electron');

var menuTemplate = [
    {
        label: 'File',
        submenu: [
            {
                label: 'Reload',
                accelerator: 'CmdOrCtrl+R',
                click (item, focusedWindow) {
                    focusedWindow.loadUrl(__dirname + '/index.html');
                }
            },
            {
                role: 'close'
            },
            {
                role: 'quit'
            }
        ]
    },
    {
        label: 'Edit',
        submenu: [
        ]
    },
    {
        label: 'View',
        submenu: [
        ]
    }
]

db.menu.insert(menuTemplate, (err, doc) => {
    if (err) return console.log('Menu Seed Error: ', err);
    if (doc) console.log(doc)
})

{'fraction_non_alphanumeric': 0.15670103092783505, 'fraction_numerical': 0.0, 'mean_word_length': 1.6958333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4641516', 'n_tokens_mistral': 594, 'n_tokens_neox': 583, 'n_words': 117}