mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-12 08:27:57 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd3d829173 | ||
|
|
fbce6379a5 |
11
README.md
11
README.md
@@ -36,12 +36,15 @@ By default, the server will intercept requests that contain `socket.io` in the p
|
||||
|
||||
On the client side, you should use the [Socket.IO client](https://github.com/LearnBoost/Socket.IO) to connect.
|
||||
|
||||
## Checking out
|
||||
## Notes
|
||||
|
||||
After cloning the repository, remember to run
|
||||
IMPORTANT! When checking out the git repo, make sure to include the submodules. One way to do it is:
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
git clone [repo] --recursive
|
||||
|
||||
Another, once cloned
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
## Demo
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net/>
|
||||
|
||||
var clone = this.clone = function(item){
|
||||
var clone;
|
||||
var cloned;
|
||||
if (item instanceof Array){
|
||||
clone = [];
|
||||
for (var i = 0; i < item.length; i++) clone[i] = clone(item[i]);
|
||||
return clone;
|
||||
cloned = [];
|
||||
for (var i = 0; i < item.length; i++) cloned[i] = clone(item[i]);
|
||||
return cloned;
|
||||
} else if (typeof item == 'object') {
|
||||
clone = {};
|
||||
for (var key in object) clone[key] = clone(object[key]);
|
||||
return clone;
|
||||
cloned = {};
|
||||
for (var key in object) cloned[key] = clone(object[key]);
|
||||
return cloned;
|
||||
} else {
|
||||
return item;
|
||||
}
|
||||
@@ -35,4 +35,4 @@ this.merge = function(source, k, v){
|
||||
for (var key in object) mergeOne(source, key, object[key]);
|
||||
}
|
||||
return source;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user