Comparing version 2.0.3 to 2.0.4
@@ -25,3 +25,2 @@ 'use strict'; | ||
var last = args[args.length - 1]; | ||
if (typeof last === 'function') { | ||
@@ -33,4 +32,9 @@ callback = args.pop(); | ||
} | ||
if (message instanceof Array) { | ||
message = { | ||
address: message[0], | ||
args: message.splice(1) | ||
} | ||
} | ||
switch (typeof message) { | ||
@@ -37,0 +41,0 @@ case 'object': |
@@ -58,3 +58,3 @@ 'use strict'; | ||
if (typetags[0] !== ',') { | ||
throw 'invalid type tag in incoming OSC message, must start with comma'; | ||
throw new Error('invalid type tag in incoming OSC message, must start with comma'); | ||
} | ||
@@ -64,3 +64,3 @@ for (var i = 1; i < typetags.length; i++) { | ||
if (!constructor) { | ||
throw 'Unsupported OSC type tag ' + typetags[i] + ' in incoming message'; | ||
throw new Error('Unsupported OSC type tag ' + typetags[i] + ' in incoming message'); | ||
} | ||
@@ -67,0 +67,0 @@ var argument = constructor(); |
{ | ||
"name": "node-osc", | ||
"description": "pyOSC inspired library", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "author": { |
41107
15
390