diff options
author | Maximilian Krambach <[email protected]> | 2018-06-06 11:05:53 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-06-06 11:05:53 +0000 |
commit | bfd3799d39df265882deedeee083fd5246a2f35d (patch) | |
tree | bfee0a85d6373fa578de075cbce4d26ddced14e4 /lang/js/src/index.js | |
parent | js: implement import/delete Key, some fixes (diff) | |
download | gpgme-bfd3799d39df265882deedeee083fd5246a2f35d.tar.gz gpgme-bfd3799d39df265882deedeee083fd5246a2f35d.zip |
js: code cleanup (eslint)
--
* trying to stick to eslint from now on for readability
* As some attribution was lost in previous git confusions, I added my
name into some of the licence headers
Diffstat (limited to '')
-rw-r--r-- | lang/js/src/index.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lang/js/src/index.js b/lang/js/src/index.js index 220a6984..1b13ec4a 100644 --- a/lang/js/src/index.js +++ b/lang/js/src/index.js @@ -16,16 +16,21 @@ * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see <http://www.gnu.org/licenses/>. * SPDX-License-Identifier: LGPL-2.1+ + * + * Author(s): + * Maximilian Krambach <[email protected]> */ -import { GpgME } from "./gpgmejs"; -import { gpgme_error } from "./Errors"; -import { Connection } from "./Connection"; -import { defaultConf, availableConf } from "./Config"; + +import { GpgME } from './gpgmejs'; +import { gpgme_error } from './Errors'; +import { Connection } from './Connection'; +import { defaultConf, availableConf } from './Config'; /** * Initializes a nativeMessaging Connection and returns a GPGMEjs object - * @param {Object} config Configuration. See Config.js for available parameters. Still TODO + * @param {Object} config Configuration. See Config.js for available parameters. + * Still TODO */ function init(config){ let _conf = parseconfiguration(config); @@ -41,16 +46,16 @@ function init(config){ } else { reject(gpgme_error('CONN_NO_CONNECT')); } - }, function(error){ + }, function(){ //unspecific connection error. Should not happen reject(gpgme_error('CONN_NO_CONNECT')); - }); + }); }); } function parseconfiguration(rawconfig = {}){ if ( typeof(rawconfig) !== 'object'){ return gpgme_error('PARAM_WRONG'); - }; + } let result_config = {}; let conf_keys = Object.keys(rawconfig); @@ -75,8 +80,8 @@ function parseconfiguration(rawconfig = {}){ } } return result_config; -}; +} export default { init: init -}
\ No newline at end of file +};
\ No newline at end of file |