Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .jshintrc

This file was deleted.

12 changes: 6 additions & 6 deletions configValidation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Joi = require('@hapi/joi');
const Joi = require('@hapi/joi')

// Schema Configuration
// schema.indexName: populated by defaults if not overridden
Expand All @@ -9,13 +9,13 @@ const schema = Joi.object().required().keys({
typeName: Joi.string().required()
}),
esclient: Joi.object().required()
}).unknown(true);
}).unknown(true)

module.exports = {
validate: function validate(config) {
const validated = schema.validate(config);
validate: function validate (config) {
const validated = schema.validate(config)
if (validated.error) {
throw new Error(validated.error.details[0].message);
throw new Error(validated.error.details[0].message)
}
}
};
}
18 changes: 9 additions & 9 deletions integration/_hits_total_helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _ = require('lodash');
const _ = require('lodash')

/**
* The way hits are defined in ES7 changed
Expand All @@ -9,12 +9,12 @@ const _ = require('lodash');
* { value: 1, relation: 'eq' }
*/

function helper(hits){
let totalHits = 0;
if (_.has(hits, 'total')) {
totalHits = _.isPlainObject(hits.total) ? hits.total.value : hits.total;
}
return totalHits;
}
function helper (hits) {
let totalHits = 0
if (_.has(hits, 'total')) {
totalHits = _.isPlainObject(hits.total) ? hits.total.value : hits.total
}
return totalHits
}

module.exports = helper;
module.exports = helper
Loading