remove Joi validation, add createClient, update tests

This commit is contained in:
2016-04-14 16:57:28 -07:00
parent cdbeef802f
commit 981bf09aab
5 changed files with 45 additions and 47 deletions

View File

@@ -0,0 +1,13 @@
import elasticsearch from 'elasticsearch';
export default function createClient(options) {
let client;
if (options instanceof elasticsearch.Client) {
client = options;
} else {
client = new elasticsearch.Client(options);
}
return client;
};