UNPKG

406 BJavaScriptView Raw
1const low = require('lowdb')
2const FileSync = require('lowdb/adapters/FileSync')
3const path = require('path')
4const home = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME']
5
6const adapter = new FileSync(path.join(home, 'gmail.json'))
7const db = low(adapter)
8
9db.defaults({ prefs: {}, credentials: {}, pages: {}, messages: [] })
10 .write()
11
12module.exports = (function () {
13 return db
14})()