UNPKG

643 BJavaScriptView Raw
1// In order to help people who were accidentally upgraded to this ES client,
2// throw an error when they try to instanciate the exported function.
3// previous "elasticsearch" module -> https://github.com/ncb000gt/node-es
4function es() {
5 throw new Error(
6 'Looks like you are expecting the previous "elasticsearch" module. ' +
7 'It is now the "es" module. To create a client with this module use ' +
8 '`new es.Client(params)`.'
9 );
10}
11
12es.Client = require('./lib/client');
13es.ConnectionPool = require('./lib/connection_pool');
14es.Transport = require('./lib/transport');
15es.errors = require('./lib/errors');
16
17module.exports = es;