1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var ElectronStore = require("electron-store");
|
4 | var StoreElectron = (function () {
|
5 | function StoreElectron(name, defaults) {
|
6 | this.defaults = defaults;
|
7 | this._electronStore = new ElectronStore({
|
8 | defaults: defaults,
|
9 | name: name,
|
10 | });
|
11 | this._electronStore.events.setMaxListeners(0);
|
12 | }
|
13 | StoreElectron.prototype.getDefaults = function () {
|
14 | return this.defaults;
|
15 | };
|
16 | StoreElectron.prototype.get = function (key) {
|
17 | return this._electronStore.get(key);
|
18 | };
|
19 | StoreElectron.prototype.set = function (key, value) {
|
20 | if (key) {
|
21 | this._electronStore.set(key, value);
|
22 | }
|
23 | else {
|
24 | this._electronStore.set(value);
|
25 | }
|
26 | };
|
27 | StoreElectron.prototype.onChanged = function (key, callback) {
|
28 | this._electronStore.onDidChange(key, callback);
|
29 | };
|
30 | StoreElectron.prototype.reveal = function () {
|
31 | this._electronStore.openInEditor();
|
32 | };
|
33 | return StoreElectron;
|
34 | }());
|
35 | exports.StoreElectron = StoreElectron;
|
36 |
|
\ | No newline at end of file |