Comparing version 2.4.5 to 2.4.6
11
index.js
@@ -534,3 +534,3 @@ 'use strict'; | ||
// | ||
var client = '(function (name, context, definition) {' | ||
var client = '(function UMDish(name, context, definition) {' | ||
+ ' context[name] = definition.call(context);' | ||
@@ -594,3 +594,3 @@ + ' if (typeof module !== "undefined" && module.exports) {' | ||
log('adding the client code of the %s plugin to the client file', name); | ||
client += global +'.prototype.ark['+ name +'] = '+ plugin.client.toString() +'\n'; | ||
client += global +'.prototype.ark['+ name +'] = '+ plugin.client.toString() +';\n'; | ||
} | ||
@@ -605,3 +605,8 @@ | ||
// | ||
return client +' return '+ global +'; });'+ library.filter(Boolean).join('\n'); | ||
return client +' return '+ global +'; });' | ||
+ library.filter(Boolean).map(function expose(library) { | ||
return '(function '+ global +'LibraryWrap('+ global +') {' | ||
+ library | ||
+ '})(this["'+ global +'"]);'; | ||
}).join('\n'); | ||
}); | ||
@@ -608,0 +613,0 @@ |
{ | ||
"name": "primus", | ||
"version": "2.4.5", | ||
"version": "2.4.6", | ||
"description": "Primus is a simple abstraction around real-time frameworks. It allows you to easily switch between different frameworks without any code changes.", | ||
@@ -63,6 +63,6 @@ "main": "index.js", | ||
"chai": "1.9.x", | ||
"derequire": "0.9.x", | ||
"derequire": "1.2.x", | ||
"ejson": "1.0.x", | ||
"engine.io": "1.3.x", | ||
"engine.io-client": "1.3.x", | ||
"engine.io": "1.4.x", | ||
"engine.io-client": "1.4.x", | ||
"faye-websocket": "0.7.x", | ||
@@ -73,3 +73,3 @@ "global-wrap": "1.4.x", | ||
"pre-commit": "0.0.x", | ||
"request": "2.40.x", | ||
"request": "2.42.x", | ||
"socket.io": "0.9.x", | ||
@@ -76,0 +76,0 @@ "socket.io-client": "0.9.x", |
@@ -644,7 +644,11 @@ /*globals require, define */ | ||
if (primus.buffer.length) { | ||
for (var i = 0, length = primus.buffer.length; i < length; i++) { | ||
primus._write(primus.buffer[i]); | ||
var data = primus.buffer.slice() | ||
, length = data.length | ||
, i = 0; | ||
primus.buffer.length = 0; | ||
for (; i < length; i++) { | ||
primus._write(data[i]); | ||
} | ||
primus.buffer = []; | ||
} | ||
@@ -651,0 +655,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
391613
9443