socket.io-parser
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -6,3 +6,4 @@ { | ||
"dependencies": { | ||
"component/json": "*" | ||
"component/json": "*", | ||
"visionmedia/debug": "*" | ||
}, | ||
@@ -9,0 +10,0 @@ "scripts": [ |
1.1.0 / 2013-12-25 | ||
================== | ||
* index: use `json3` | ||
1.0.3 / 2012-12-18 | ||
================== | ||
* index: added instrumentation through `debug` | ||
* index: make sure decoded `id` is a `Number` | ||
1.0.2 / 2012-12-18 | ||
@@ -3,0 +14,0 @@ ================== |
12
index.js
@@ -6,10 +6,5 @@ | ||
var json; | ||
var debug = require('debug')('socket.io-parser'); | ||
var json = require('json3'); | ||
try { | ||
json = require('json'); | ||
} catch(e){ | ||
json = JSON; | ||
} | ||
/** | ||
@@ -114,2 +109,3 @@ * Protocol version. | ||
debug('encoded %j as %s', obj, str); | ||
return str; | ||
@@ -160,2 +156,3 @@ }; | ||
} | ||
p.id = Number(p.id); | ||
} | ||
@@ -172,2 +169,3 @@ | ||
debug('decoded %s as %j', str, p); | ||
return p; | ||
@@ -174,0 +172,0 @@ }; |
{ | ||
"name": "socket.io-parser", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "socket.io protocol parser", | ||
"repository":{ | ||
"type": "git", | ||
"url": "https://github.com/LearnBoost/socket.io-protocol.git" | ||
}, | ||
"dependencies": { | ||
"debug": "0.6.0", | ||
"json3": "3.2.6" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*", | ||
"expect.js": "*" | ||
"mocha": "1.16.2", | ||
"expect.js": "0.2.0" | ||
}, | ||
@@ -9,0 +17,0 @@ "component": { |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
8037
0
2
+ Addeddebug@0.6.0
+ Addedjson3@3.2.6
+ Addeddebug@0.6.0(transitive)
+ Addedjson3@3.2.6(transitive)