Skip to content

Commit

Permalink
style: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-koval committed Jan 19, 2018
1 parent c162288 commit b521bf4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const Trembita = class Trembita {
*/
static _validateOptions (options) {
if (!options) { throw new TrembitaError('missing options'); }
if (!isObject(options)) throw new TrembitaError('options is not an object');
if (!isObject(options)) {throw new TrembitaError('options is not an object');}

function isObject(value) {
const type = typeof value
return value != null && (type == 'object' || type == 'function')
return value !== null && (type === 'object' || type === 'function')
}
}

Expand All @@ -66,9 +66,9 @@ const Trembita = class Trembita {
if (!options.endpoint) { throw new TrembitaError('missing endpoint'); }
if (typeof options.endpoint !== 'string') { throw new TrembitaError('endpoint is not string'); }
if (!isURL(options.endpoint, {
protocols: ['http','https'],
require_protocol: true,
require_host: true,
protocols: ['http', 'https'],
require_protocol: true, // eslint-disable-line camelcase
require_host: true, // eslint-disable-line camelcase
})) { throw new TrembitaError('endpoint is not valid url') }
}
};
Expand Down

0 comments on commit b521bf4

Please sign in to comment.