Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nats

Package Overview
Dependencies
Maintainers
2
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nats - npm Package Compare versions

Comparing version 0.7.4 to 0.7.6

4

lib/nats.js

@@ -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']);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc