diff --git a/client/dom/storage.js b/client/dom/storage.js index c8d427cd..a2de5201 100644 --- a/client/dom/storage.js +++ b/client/dom/storage.js @@ -5,7 +5,7 @@ const tryCatch = require('try-catch'); const {parse, stringify} = JSON; const isObj = (a) => typeof a === 'object'; -module.exports.set = async (name, data) => { +module.exports.set = (name, data) => { const primitive = !isObj(data) ? data : stringify(data); localStorage.setItem(name, primitive); @@ -18,11 +18,11 @@ module.exports.get = async (name) => { return result; }; -module.exports.clear = async () => { +module.exports.clear = () => { localStorage.clear(); }; -module.exports.remove = async(item) => { +module.exports.remove = (item) => { localStorage.removeItem(item); }; diff --git a/client/key/vim/vim.js b/client/key/vim/vim.js index 17ef9fa1..cee0293a 100644 --- a/client/key/vim/vim.js +++ b/client/key/vim/vim.js @@ -48,7 +48,11 @@ module.exports = (key, operations) => { } if (key === 'j') { - const {count, isDelete, isVisual} = handleDelete(prevStore); + const { + count, + isDelete, + isVisual, + } = handleDelete(prevStore); !isNaN(count) && moveNext({ count, @@ -60,7 +64,11 @@ module.exports = (key, operations) => { } if (key === 'k') { - const {count, isDelete, isVisual} = handleDelete(prevStore); + const { + count, + isDelete, + isVisual, + } = handleDelete(prevStore); !isNaN(count) && movePrevious({ count, @@ -72,7 +80,10 @@ module.exports = (key, operations) => { } if (/^gg$/.test(value)) { - const {count, isDelete, isVisual} = handleDelete(prevStore); + const { + isDelete, + isVisual, + } = handleDelete(prevStore); movePrevious({ count: Infinity, diff --git a/client/modules/view.js b/client/modules/view.js index 0445fed5..e192dcf9 100644 --- a/client/modules/view.js +++ b/client/modules/view.js @@ -128,7 +128,7 @@ async function show(data, options) { } } -async function viewPDF(src) { +function viewPDF(src) { const element = createElement('iframe', { src, width: '100%', diff --git a/server/config.js b/server/config.js index c93e9a41..674afe3a 100644 --- a/server/config.js +++ b/server/config.js @@ -7,7 +7,6 @@ const DIR = DIR_SERVER + '../'; const path = require('path'); const fs = require('fs'); const Emitter = require('events'); -const {promisify} = require('util'); const {homedir} = require('os'); const exit = require(DIR_SERVER + 'exit');