Comparing version 0.0.3 to 0.0.4
@@ -27,3 +27,7 @@ 'use strict'; | ||
this.connection = (0, _nats.connect)(opts); | ||
var defaultOpts = { | ||
json: true | ||
}; | ||
this.connection = (0, _nats.connect)(Object.assign(defaultOpts, opts)); | ||
} | ||
@@ -100,2 +104,9 @@ | ||
} | ||
/** | ||
* Flush outbound queue to server | ||
* | ||
* @returns {Promise} | ||
*/ | ||
}, { | ||
@@ -102,0 +113,0 @@ key: 'flush', |
{ | ||
"name": "natsify", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A nuts wrapper with promises", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -12,3 +12,7 @@ import { connect } from 'nats' | ||
constructor (opts = {}) { | ||
this.connection = connect(opts) | ||
let defaultOpts = { | ||
json: true | ||
} | ||
this.connection = connect(Object.assign(defaultOpts, opts)) | ||
} | ||
@@ -68,2 +72,7 @@ | ||
/** | ||
* Flush outbound queue to server | ||
* | ||
* @returns {Promise} | ||
*/ | ||
flush () { | ||
@@ -70,0 +79,0 @@ return new Promise((resolve, reject) => { |
Sorry, the diff of this file is not supported yet
6978
209