Comparing version 0.7.4 to 0.7.6
@@ -26,3 +26,3 @@ /*! | ||
var VERSION = '0.7.4', | ||
var VERSION = '0.7.6', | ||
@@ -1053,3 +1053,3 @@ DEFAULT_PORT = 4222, | ||
if (this.options.json) { | ||
if (typeof msg !== 'object' || Array.isArray(msg)) { | ||
if (typeof msg !== 'object') { | ||
throw(new NatsError(BAD_JSON_MSG, BAD_JSON)); | ||
@@ -1056,0 +1056,0 @@ } |
{ | ||
"name": "nats", | ||
"version": "0.7.4", | ||
"version": "0.7.6", | ||
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -52,2 +52,15 @@ /* jslint node: true */ | ||
}); | ||
it('should pub/sub array with json', function(done){ | ||
var nc = NATS.connect({json: true, port: PORT}); | ||
nc.subscribe('foo', function(msg, reply, subj, sid){ | ||
should.ok(typeof msg !== 'string'); | ||
msg.should.be.instanceof(Array).and.have.lengthOf(3); | ||
nc.unsubscribe(sid); | ||
nc.close(); | ||
done(); | ||
}); | ||
nc.publish('foo', ['one', 'two', 'three']); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129083
3508