settings: Insight.js refactor 3
This commit is contained in:
parent
08db6831ce
commit
e3afce6a9f
1 changed files with 4 additions and 4 deletions
|
|
@ -29,15 +29,15 @@ var preconditions = require('preconditions').singleton();
|
|||
*/
|
||||
|
||||
var Insight = function(opts) {
|
||||
this.status = this.STATUS.DISCONNECTED;
|
||||
this.subscribed = {};
|
||||
this.listeningBlocks = false;
|
||||
|
||||
preconditions.checkArgument(opts).shouldBeObject(opts)
|
||||
.checkArgument(opts.host)
|
||||
.checkArgument(opts.port)
|
||||
.checkArgument(opts.schema);
|
||||
|
||||
this.status = this.STATUS.DISCONNECTED;
|
||||
this.subscribed = {};
|
||||
this.listeningBlocks = false;
|
||||
|
||||
this.url = opts.schema + '://' + opts.host + ':' + opts.port;
|
||||
this.opts = {
|
||||
'reconnection': opts.reconnection || true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue