├── .gitignore
├── LICENSE.txt
├── Procfile
├── Procfile-dev
├── README.md
├── app.js
├── checkpoints
└── venice
│ └── opt.txt
├── package.json
├── pix2pix
├── LICENSE
├── README.md
├── data
│ ├── combine_A_and_B.py
│ ├── data.lua
│ ├── dataset.lua
│ └── donkey_folder.lua
├── datasets
│ └── download_dataset.sh
├── imgs
│ └── examples.jpg
├── models.lua
├── test.lua
├── train.lua
└── util
│ ├── cudnn_convert_custom.lua
│ └── util.lua
└── public
├── css
└── style.css
├── gallery
├── drawing
│ └── d1480603297112.jpg
└── render
│ └── r1480603297112.jpg
├── index.html
└── js
├── client.js
├── libs
├── jquery-1.8.3.min.js
├── p5.dom.js
├── p5.js
└── p5.sound.js
├── sketcher.js
└── socket.io-client
├── History.md
├── LICENSE
├── README.md
├── index.js
├── lib
├── index.js
├── manager.js
├── on.js
├── socket.js
└── url.js
├── node_modules
├── backo2
│ ├── .npmignore
│ ├── History.md
│ ├── Makefile
│ ├── Readme.md
│ ├── component.json
│ ├── index.js
│ ├── package.json
│ └── test
│ │ └── index.js
├── component-bind
│ ├── .npmignore
│ ├── History.md
│ ├── Makefile
│ ├── Readme.md
│ ├── component.json
│ ├── index.js
│ └── package.json
├── component-emitter
│ ├── .npmignore
│ ├── .travis.yml
│ ├── History.md
│ ├── Makefile
│ ├── Readme.md
│ ├── bower.json
│ ├── component.json
│ ├── index.js
│ └── package.json
├── debug
│ ├── Readme.md
│ ├── debug.js
│ ├── index.js
│ ├── lib
│ │ └── debug.js
│ └── package.json
├── engine.io-client
│ ├── .npmignore
│ ├── .travis.yml
│ ├── .zuul.yml
│ ├── History.md
│ ├── Makefile
│ ├── README.md
│ ├── engine.io.js
│ ├── index.js
│ ├── lib
│ │ ├── index.js
│ │ ├── socket.js
│ │ ├── transport.js
│ │ ├── transports
│ │ │ ├── index.js
│ │ │ ├── polling-jsonp.js
│ │ │ ├── polling-xhr.js
│ │ │ ├── polling.js
│ │ │ └── websocket.js
│ │ └── xmlhttprequest.js
│ ├── node_modules
│ │ ├── .bin
│ │ │ └── wscat
│ │ ├── component-inherit
│ │ │ ├── .npmignore
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── Readme.md
│ │ │ ├── component.json
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ └── test
│ │ │ │ └── inherit.js
│ │ ├── debug
│ │ │ ├── .jshintrc
│ │ │ ├── .npmignore
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── Readme.md
│ │ │ ├── browser.js
│ │ │ ├── component.json
│ │ │ ├── debug.js
│ │ │ ├── node.js
│ │ │ ├── node_modules
│ │ │ │ └── ms
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ └── package.json
│ │ ├── engine.io-parser
│ │ │ ├── .npmignore
│ │ │ ├── .travis.yml
│ │ │ ├── .zuul.yml
│ │ │ ├── History.md
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── Readme.md
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── browser.js
│ │ │ │ ├── index.js
│ │ │ │ └── keys.js
│ │ │ ├── node_modules
│ │ │ │ ├── after
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── LICENCE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test
│ │ │ │ │ │ └── after-test.js
│ │ │ │ ├── arraybuffer.slice
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test
│ │ │ │ │ │ └── slice-buffer.js
│ │ │ │ ├── base64-arraybuffer
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── LICENSE-MIT
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── README.md~
│ │ │ │ │ ├── grunt.js
│ │ │ │ │ ├── lib
│ │ │ │ │ │ └── base64-arraybuffer.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── package.json~
│ │ │ │ │ └── test
│ │ │ │ │ │ └── base64-arraybuffer_test.js
│ │ │ │ ├── blob
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .zuul.yml
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test
│ │ │ │ │ │ └── index.js
│ │ │ │ ├── has-binary
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── fixtures
│ │ │ │ │ │ └── big.json
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ │ └── isarray
│ │ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ │ ├── build
│ │ │ │ │ │ │ └── build.js
│ │ │ │ │ │ │ ├── component.json
│ │ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test.js
│ │ │ │ └── utf8
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── Gruntfile.js
│ │ │ │ │ ├── LICENSE-GPL.txt
│ │ │ │ │ ├── LICENSE-MIT.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bower.json
│ │ │ │ │ ├── component.json
│ │ │ │ │ ├── coverage
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── prettify.css
│ │ │ │ │ ├── prettify.js
│ │ │ │ │ └── utf8.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── utf8.js.html
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── tests
│ │ │ │ │ ├── generate-test-data.py
│ │ │ │ │ ├── index.html
│ │ │ │ │ └── tests.js
│ │ │ │ │ ├── utf8.js
│ │ │ │ │ └── x.js
│ │ │ └── package.json
│ │ ├── has-cors
│ │ │ ├── .npmignore
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── Readme.md
│ │ │ ├── component.json
│ │ │ ├── index.js
│ │ │ ├── node_modules
│ │ │ │ └── global
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── component.json
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── test
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mocha.css
│ │ │ │ │ ├── mocha.js
│ │ │ │ │ └── test.js
│ │ │ └── package.json
│ │ ├── parsejson
│ │ │ ├── Makefile
│ │ │ ├── index.js
│ │ │ ├── node_modules
│ │ │ │ └── better-assert
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── example.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ └── callsite
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ ├── package.json
│ │ │ └── test.js
│ │ ├── parseqs
│ │ │ ├── Makefile
│ │ │ ├── index.js
│ │ │ ├── node_modules
│ │ │ │ └── better-assert
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── example.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ └── callsite
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ ├── package.json
│ │ │ └── test.js
│ │ ├── parseuri
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── index.js
│ │ │ ├── node_modules
│ │ │ │ └── better-assert
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── example.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── node_modules
│ │ │ │ │ └── callsite
│ │ │ │ │ │ ├── .npmignore
│ │ │ │ │ │ ├── History.md
│ │ │ │ │ │ ├── Makefile
│ │ │ │ │ │ ├── Readme.md
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ └── package.json
│ │ │ ├── package.json
│ │ │ └── test.js
│ │ ├── ws
│ │ │ ├── .npmignore
│ │ │ ├── .travis.yml
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── bench
│ │ │ │ ├── parser.benchmark.js
│ │ │ │ ├── sender.benchmark.js
│ │ │ │ ├── speed.js
│ │ │ │ └── util.js
│ │ │ ├── bin
│ │ │ │ └── wscat
│ │ │ ├── binding.gyp
│ │ │ ├── build
│ │ │ │ ├── Makefile
│ │ │ │ ├── Release
│ │ │ │ │ └── .deps
│ │ │ │ │ │ └── Release
│ │ │ │ │ │ └── obj.target
│ │ │ │ │ │ └── bufferutil
│ │ │ │ │ │ └── src
│ │ │ │ │ │ └── bufferutil.o.d.raw
│ │ │ │ ├── binding.Makefile
│ │ │ │ ├── bufferutil.target.mk
│ │ │ │ ├── config.gypi
│ │ │ │ ├── gyp-mac-tool
│ │ │ │ └── validation.target.mk
│ │ │ ├── builderror.log
│ │ │ ├── doc
│ │ │ │ └── ws.md
│ │ │ ├── examples
│ │ │ │ ├── fileapi
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── public
│ │ │ │ │ │ ├── app.js
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── uploader.js
│ │ │ │ │ └── server.js
│ │ │ │ ├── serverstats-express_3
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── public
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── server.js
│ │ │ │ ├── serverstats
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── public
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── server.js
│ │ │ │ └── ssl.js
│ │ │ ├── index.js
│ │ │ ├── lib
│ │ │ │ ├── BufferPool.js
│ │ │ │ ├── BufferUtil.fallback.js
│ │ │ │ ├── BufferUtil.js
│ │ │ │ ├── ErrorCodes.js
│ │ │ │ ├── Receiver.hixie.js
│ │ │ │ ├── Receiver.js
│ │ │ │ ├── Sender.hixie.js
│ │ │ │ ├── Sender.js
│ │ │ │ ├── Validation.fallback.js
│ │ │ │ ├── Validation.js
│ │ │ │ ├── WebSocket.js
│ │ │ │ ├── WebSocketServer.js
│ │ │ │ └── browser.js
│ │ │ ├── node_modules
│ │ │ │ ├── commander
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── History.md
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── Readme.md
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── lib
│ │ │ │ │ │ └── commander.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── nan
│ │ │ │ │ ├── .index.js
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── nan.h
│ │ │ │ │ └── package.json
│ │ │ │ ├── options
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── lib
│ │ │ │ │ │ └── options.js
│ │ │ │ │ └── package.json
│ │ │ │ └── tinycolor
│ │ │ │ │ ├── .npmignore
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── example.js
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── tinycolor.js
│ │ │ ├── package.json
│ │ │ ├── src
│ │ │ │ ├── bufferutil.cc
│ │ │ │ └── validation.cc
│ │ │ └── test
│ │ │ │ ├── BufferPool.test.js
│ │ │ │ ├── Receiver.hixie.test.js
│ │ │ │ ├── Receiver.test.js
│ │ │ │ ├── Sender.hixie.test.js
│ │ │ │ ├── Sender.test.js
│ │ │ │ ├── Validation.test.js
│ │ │ │ ├── WebSocket.integration.js
│ │ │ │ ├── WebSocket.test.js
│ │ │ │ ├── WebSocketServer.test.js
│ │ │ │ ├── autobahn-server.js
│ │ │ │ ├── autobahn.js
│ │ │ │ ├── fixtures
│ │ │ │ ├── agent1-cert.pem
│ │ │ │ ├── agent1-key.pem
│ │ │ │ ├── ca1-cert.pem
│ │ │ │ ├── ca1-key.pem
│ │ │ │ ├── certificate.pem
│ │ │ │ ├── key.pem
│ │ │ │ ├── request.pem
│ │ │ │ └── textfile
│ │ │ │ ├── hybi-common.js
│ │ │ │ └── testserver.js
│ │ └── xmlhttprequest
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── autotest.watchr
│ │ │ ├── example
│ │ │ └── demo.js
│ │ │ ├── lib
│ │ │ └── XMLHttpRequest.js
│ │ │ ├── package.json
│ │ │ └── tests
│ │ │ ├── test-constants.js
│ │ │ ├── test-events.js
│ │ │ ├── test-exceptions.js
│ │ │ ├── test-headers.js
│ │ │ ├── test-redirect-302.js
│ │ │ ├── test-redirect-303.js
│ │ │ ├── test-redirect-307.js
│ │ │ ├── test-request-methods.js
│ │ │ ├── test-request-protocols.js
│ │ │ └── testdata.txt
│ └── package.json
├── has-binary
│ ├── .npmignore
│ ├── History.md
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── fixtures
│ │ └── big.json
│ ├── index.js
│ ├── node_modules
│ │ └── isarray
│ │ │ ├── README.md
│ │ │ ├── build
│ │ │ └── build.js
│ │ │ ├── component.json
│ │ │ ├── index.js
│ │ │ └── package.json
│ ├── package.json
│ └── test.js
├── indexof
│ ├── .npmignore
│ ├── Makefile
│ ├── Readme.md
│ ├── component.json
│ ├── index.js
│ └── package.json
├── object-component
│ ├── .npmignore
│ ├── History.md
│ ├── Makefile
│ ├── Readme.md
│ ├── component.json
│ ├── index.js
│ ├── package.json
│ └── test
│ │ └── object.js
├── parseuri
│ ├── History.md
│ ├── Makefile
│ ├── index.js
│ ├── node_modules
│ │ └── better-assert
│ │ │ ├── .npmignore
│ │ │ ├── History.md
│ │ │ ├── Makefile
│ │ │ ├── Readme.md
│ │ │ ├── example.js
│ │ │ ├── index.js
│ │ │ ├── node_modules
│ │ │ └── callsite
│ │ │ │ ├── .npmignore
│ │ │ │ ├── History.md
│ │ │ │ ├── Makefile
│ │ │ │ ├── Readme.md
│ │ │ │ ├── index.js
│ │ │ │ └── package.json
│ │ │ └── package.json
│ ├── package.json
│ └── test.js
└── to-array
│ ├── .npmignore
│ ├── LICENCE
│ ├── README.md
│ ├── index.js
│ └── package.json
├── package.json
└── socket.io.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.t7
3 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: node app.js
2 |
--------------------------------------------------------------------------------
/Procfile-dev:
--------------------------------------------------------------------------------
1 | web: nodemon app.js
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Drawing interface for [Invisible Cities](http://opendot.github.io/ml4a-invisible-cities/), using [pix2pix](https://github.com/phillipi/pix2pix), [p5.js](http://p5js.org), and [node](https://nodejs.org/en/).
2 |
3 | Watch it in action [here](https://vimeo.com/194531286).
4 |
5 | First install node modules.
6 |
7 | npm install
8 |
9 | Train a new model, referring to the instructions in the [readme in pix2pix](https://github.com/phillipi/pix2pix). Models for Seoul and Venice will be made available shortly.
10 |
11 | Launch the server with node:
12 |
13 | node app.js
14 |
15 | then go over to `localhost:5000`. If you want to run it over a different port, then:
16 |
17 | PORT=8090 node app.js
18 |
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "app.js",
6 | "scripts": {
7 | "start": "node server.js"
8 | },
9 | "author": "Gene Kogan",
10 | "license": "GNU GPL v3",
11 | "dependencies": {
12 | "express": "^4.12.4",
13 | "socket.io": "^1.3.5"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/pix2pix/datasets/download_dataset.sh:
--------------------------------------------------------------------------------
1 | FILE=$1
2 | URL=https://people.eecs.berkeley.edu/~isola/pix2pix/$FILE.tar
3 | TAR_FILE=./datasets/$FILE.tar
4 | TARGET_DIR=./datasets/$FILE/
5 | wget -N $URL -O $TAR_FILE
6 | mkdir $TARGET_DIR
7 | tar -xvf $TAR_FILE -C ./datasets/
8 | rm $TAR_FILE
9 |
--------------------------------------------------------------------------------
/pix2pix/imgs/examples.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/genekogan/InvisibleCities/7c4e91c1e3f29236c3c18eb35ab03d427af68d66/pix2pix/imgs/examples.jpg
--------------------------------------------------------------------------------
/public/css/style.css:
--------------------------------------------------------------------------------
1 |
2 | body {
3 | padding: 0;
4 | margin-left: auto;
5 | margin-right: auto;
6 | background-color:#333;
7 | }
8 |
9 | #main {
10 | text-align:center;
11 | }
12 |
13 | #draw {
14 | display:inline-block;
15 | padding:4px;
16 | margin:5px;
17 | background-color: #999;
18 | }
19 |
20 | #result {
21 | display:inline-block;
22 | padding:4px;
23 | margin:5px;
24 | background-color: #999;
25 | }
26 |
27 | #nav {
28 | display:inline-block;
29 | padding:4px;
30 | margin:5px;
31 | background-color: #999;
32 | }
--------------------------------------------------------------------------------
/public/gallery/drawing/d1480603297112.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/genekogan/InvisibleCities/7c4e91c1e3f29236c3c18eb35ab03d427af68d66/public/gallery/drawing/d1480603297112.jpg
--------------------------------------------------------------------------------
/public/gallery/render/r1480603297112.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/genekogan/InvisibleCities/7c4e91c1e3f29236c3c18eb35ab03d427af68d66/public/gallery/render/r1480603297112.jpg
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pix2Pix interface
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
![]()
21 |
22 |
23 |
24 |
25 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/public/js/client.js:
--------------------------------------------------------------------------------
1 | var host = window.location.origin;
2 |
3 | function start() {
4 | var socket = io.connect(host);
5 |
6 | // receive errors from debug-console.js via server.js
7 | socket.on('err', function(err) {
8 | //logError(data);
9 | });
10 |
11 | socket.on('getData', function (data) {
12 | //
13 | });
14 |
15 | socket.on('newImageGenerated', function (data) {
16 | console.log("got image "+data.timestamp);
17 | $("#results_image").attr("src", "gallery/render/r"+data.timestamp+".jpg");
18 | });
19 | };
20 |
21 | function requestData() {
22 | var socket = io.connect(host);
23 | socket.emit('requestData');
24 | };
25 |
26 | function sendData() {
27 | var socket = io.connect(host);
28 | var canvas = document.getElementById("defaultCanvas0");
29 | var canvas_2 = document.createElement('canvas');
30 | var ctx = canvas_2.getContext('2d');
31 | canvas_2.width = canvas.width * 2;
32 | canvas_2.height = canvas.height;
33 | ctx.drawImage(canvas, 0, 0);
34 | var img = canvas_2.toDataURL("image/png");
35 | socket.emit('sendData', {data:"data", image:img});
36 | };
37 |
38 | function activateTouchEvents() {
39 | var canvas0 = document.getElementById("defaultCanvas0");
40 | var canvas1 = document.getElementById("defaultCanvas1");
41 | canvas0.ontouchstart = function(e) {
42 | if (e.touches) e = e.touches[0];
43 | return false;
44 | };
45 | canvas1.ontouchstart = function(e) {
46 | if (e.touches) e = e.touches[0];
47 | return false;
48 | };
49 | };
50 |
51 | window.onload = function() {
52 | start();
53 | activateTouchEvents();
54 | };
55 |
56 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Guillermo Rauch
4 |
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
--------------------------------------------------------------------------------
/public/js/socket.io-client/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/');
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/lib/on.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module exports.
4 | */
5 |
6 | module.exports = on;
7 |
8 | /**
9 | * Helper for subscriptions.
10 | *
11 | * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter`
12 | * @param {String} event name
13 | * @param {Function} callback
14 | * @api public
15 | */
16 |
17 | function on(obj, ev, fn) {
18 | obj.on(ev, fn);
19 | return {
20 | destroy: function(){
21 | obj.removeListener(ev, fn);
22 | }
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.1 / 2014-02-17
3 | ==================
4 |
5 | * go away decimal point
6 | * history
7 |
8 | 1.0.0 / 2014-02-17
9 | ==================
10 |
11 | * add jitter option
12 | * Initial commit
13 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should \
5 | --reporter dot \
6 | --bail
7 |
8 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/Readme.md:
--------------------------------------------------------------------------------
1 | # backo
2 |
3 | Simple exponential backoff because the others seem to have weird abstractions.
4 |
5 | ## Installation
6 |
7 | ```
8 | $ npm install backo
9 | ```
10 |
11 | ## Options
12 |
13 | - `min` initial timeout in milliseconds [100]
14 | - `max` max timeout [10000]
15 | - `jitter` [0]
16 | - `factor` [2]
17 |
18 | ## Example
19 |
20 | ```js
21 | var Backoff = require('backo');
22 | var backoff = new Backoff({ min: 100, max: 20000 });
23 |
24 | setTimeout(function(){
25 | something.reconnect();
26 | }, backoff.duration());
27 |
28 | // later when something works
29 | backoff.reset()
30 | ```
31 |
32 | # License
33 |
34 | MIT
35 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backo",
3 | "repo": "segmentio/backo",
4 | "dependencies": {},
5 | "version": "1.0.1",
6 | "description": "simple backoff without the weird abstractions",
7 | "keywords": ["backoff"],
8 | "license": "MIT",
9 | "scripts": ["index.js"],
10 | "main": "index.js"
11 | }
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Expose `Backoff`.
4 | */
5 |
6 | module.exports = Backoff;
7 |
8 | /**
9 | * Initialize backoff timer with `opts`.
10 | *
11 | * - `min` initial timeout in milliseconds [100]
12 | * - `max` max timeout [10000]
13 | * - `jitter` [0]
14 | * - `factor` [2]
15 | *
16 | * @param {Object} opts
17 | * @api public
18 | */
19 |
20 | function Backoff(opts) {
21 | opts = opts || {};
22 | this.ms = opts.min || 100;
23 | this.max = opts.max || 10000;
24 | this.factor = opts.factor || 2;
25 | this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;
26 | this.attempts = 0;
27 | }
28 |
29 | /**
30 | * Return the backoff duration.
31 | *
32 | * @return {Number}
33 | * @api public
34 | */
35 |
36 | Backoff.prototype.duration = function(){
37 | var ms = this.ms * Math.pow(this.factor, this.attempts++);
38 | if (this.jitter) {
39 | var rand = Math.random();
40 | var deviation = Math.floor(rand * this.jitter * ms);
41 | ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;
42 | }
43 | return Math.min(ms, this.max) | 0;
44 | };
45 |
46 | /**
47 | * Reset the number of attempts.
48 | *
49 | * @api public
50 | */
51 |
52 | Backoff.prototype.reset = function(){
53 | this.attempts = 0;
54 | };
55 |
56 | /**
57 | * Set the minimum duration
58 | *
59 | * @api public
60 | */
61 |
62 | Backoff.prototype.setMin = function(min){
63 | this.ms = min;
64 | };
65 |
66 | /**
67 | * Set the maximum duration
68 | *
69 | * @api public
70 | */
71 |
72 | Backoff.prototype.setMax = function(max){
73 | this.max = max;
74 | };
75 |
76 | /**
77 | * Set the jitter
78 | *
79 | * @api public
80 | */
81 |
82 | Backoff.prototype.setJitter = function(jitter){
83 | this.jitter = jitter;
84 | };
85 |
86 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backo2",
3 | "version": "1.0.2",
4 | "repository": {
5 | "type": "git",
6 | "url": "git+https://github.com/mokesmokes/backo.git"
7 | },
8 | "description": "simple backoff based on segmentio/backo",
9 | "keywords": [
10 | "backoff"
11 | ],
12 | "dependencies": {},
13 | "devDependencies": {
14 | "mocha": "*",
15 | "should": "*"
16 | },
17 | "license": "MIT",
18 | "gitHead": "3e695bade7756fef2295e8883bf3570a06e5d9ec",
19 | "bugs": {
20 | "url": "https://github.com/mokesmokes/backo/issues"
21 | },
22 | "homepage": "https://github.com/mokesmokes/backo",
23 | "_id": "backo2@1.0.2",
24 | "scripts": {},
25 | "_shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947",
26 | "_from": "backo2@1.0.2",
27 | "_npmVersion": "1.4.28",
28 | "_npmUser": {
29 | "name": "mokesmokes",
30 | "email": "mokesmokes@gmail.com"
31 | },
32 | "maintainers": [
33 | {
34 | "name": "mokesmokes",
35 | "email": "mokesmokes@gmail.com"
36 | }
37 | ],
38 | "dist": {
39 | "shasum": "31ab1ac8b129363463e35b3ebb69f4dfcfba7947",
40 | "tarball": "http://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz"
41 | },
42 | "directories": {},
43 | "_resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
44 | "readme": "ERROR: No README data found!"
45 | }
46 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/backo2/test/index.js:
--------------------------------------------------------------------------------
1 |
2 | var Backoff = require('..');
3 | var assert = require('assert');
4 |
5 | describe('.duration()', function(){
6 | it('should increase the backoff', function(){
7 | var b = new Backoff;
8 |
9 | assert(100 == b.duration());
10 | assert(200 == b.duration());
11 | assert(400 == b.duration());
12 | assert(800 == b.duration());
13 |
14 | b.reset();
15 | assert(100 == b.duration());
16 | assert(200 == b.duration());
17 | })
18 | })
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2014-05-27
3 | ==================
4 |
5 | * index: use slice ref (#7, @viatropos)
6 | * package: rename package to "component-bind"
7 | * package: add "repository" field (#6, @repoify)
8 | * package: add "component" section
9 |
10 | 0.0.1 / 2010-01-03
11 | ==================
12 |
13 | * Initial release
14 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should \
5 | --reporter spec
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/Readme.md:
--------------------------------------------------------------------------------
1 | # bind
2 |
3 | Function binding utility.
4 |
5 | ## Installation
6 |
7 | ```
8 | $ component install component/bind
9 | ```
10 |
11 | ## API
12 |
13 | - [bind(obj, fn)](#bindobj-fn)
14 | - [bind(obj, fn, ...)](#bindobj-fn-)
15 | - [bind(obj, name)](#bindobj-name)
16 |
17 |
18 |
19 | ### bind(obj, fn)
20 | should bind the function to the given object.
21 |
22 | ```js
23 | var tobi = { name: 'tobi' };
24 |
25 | function name() {
26 | return this.name;
27 | }
28 |
29 | var fn = bind(tobi, name);
30 | fn().should.equal('tobi');
31 | ```
32 |
33 |
34 | ### bind(obj, fn, ...)
35 | should curry the remaining arguments.
36 |
37 | ```js
38 | function add(a, b) {
39 | return a + b;
40 | }
41 |
42 | bind(null, add)(1, 2).should.equal(3);
43 | bind(null, add, 1)(2).should.equal(3);
44 | bind(null, add, 1, 2)().should.equal(3);
45 | ```
46 |
47 |
48 | ### bind(obj, name)
49 | should bind the method of the given name.
50 |
51 | ```js
52 | var tobi = { name: 'tobi' };
53 |
54 | tobi.getName = function() {
55 | return this.name;
56 | };
57 |
58 | var fn = bind(tobi, 'getName');
59 | fn().should.equal('tobi');
60 | ```
61 |
62 | ## License
63 |
64 | MIT
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bind",
3 | "version": "1.0.0",
4 | "description": "function binding utility",
5 | "keywords": [
6 | "bind",
7 | "utility"
8 | ],
9 | "dependencies": {},
10 | "scripts": [
11 | "index.js"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Slice reference.
3 | */
4 |
5 | var slice = [].slice;
6 |
7 | /**
8 | * Bind `obj` to `fn`.
9 | *
10 | * @param {Object} obj
11 | * @param {Function|String} fn or string
12 | * @return {Function}
13 | * @api public
14 | */
15 |
16 | module.exports = function(obj, fn){
17 | if ('string' == typeof fn) fn = obj[fn];
18 | if ('function' != typeof fn) throw new Error('bind() requires a function');
19 | var args = slice.call(arguments, 2);
20 | return function(){
21 | return fn.apply(obj, args.concat(slice.call(arguments)));
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-bind/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "component-bind",
3 | "version": "1.0.0",
4 | "description": "function binding utility",
5 | "keywords": [
6 | "bind",
7 | "utility"
8 | ],
9 | "devDependencies": {
10 | "mocha": "*",
11 | "should": "*"
12 | },
13 | "component": {
14 | "scripts": {
15 | "bind/index.js": "index.js"
16 | }
17 | },
18 | "repository": {
19 | "type": "git",
20 | "url": "git+https://github.com/component/bind.git"
21 | },
22 | "bugs": {
23 | "url": "https://github.com/component/bind/issues"
24 | },
25 | "homepage": "https://github.com/component/bind",
26 | "_id": "component-bind@1.0.0",
27 | "_shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1",
28 | "_from": "component-bind@1.0.0",
29 | "_npmVersion": "1.4.9",
30 | "_npmUser": {
31 | "name": "tootallnate",
32 | "email": "nathan@tootallnate.net"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "tootallnate",
37 | "email": "nathan@tootallnate.net"
38 | }
39 | ],
40 | "dist": {
41 | "shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1",
42 | "tarball": "http://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz"
43 | },
44 | "directories": {},
45 | "_resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
46 | "readme": "ERROR: No README data found!"
47 | }
48 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/.travis.yml:
--------------------------------------------------------------------------------
1 | node_js:
2 | - "0.8"
3 | - "0.10"
4 | language: node_js
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.1.2 / 2014-02-10
3 | ==================
4 |
5 | * package: rename to "component-emitter"
6 | * package: update "main" and "component" fields
7 | * Add license to Readme (same format as the other components)
8 | * created .npmignore
9 | * travis stuff
10 |
11 | 1.1.1 / 2013-12-01
12 | ==================
13 |
14 | * fix .once adding .on to the listener
15 | * docs: Emitter#off()
16 | * component: add `.repo` prop
17 |
18 | 1.1.0 / 2013-10-20
19 | ==================
20 |
21 | * add `.addEventListener()` and `.removeEventListener()` aliases
22 |
23 | 1.0.1 / 2013-06-27
24 | ==================
25 |
26 | * add support for legacy ie
27 |
28 | 1.0.0 / 2013-02-26
29 | ==================
30 |
31 | * add `.off()` support for removing all listeners
32 |
33 | 0.0.6 / 2012-10-08
34 | ==================
35 |
36 | * add `this._callbacks` initialization to prevent funky gotcha
37 |
38 | 0.0.5 / 2012-09-07
39 | ==================
40 |
41 | * fix `Emitter.call(this)` usage
42 |
43 | 0.0.3 / 2012-07-11
44 | ==================
45 |
46 | * add `.listeners()`
47 | * rename `.has()` to `.hasListeners()`
48 |
49 | 0.0.2 / 2012-06-28
50 | ==================
51 |
52 | * fix `.off()` with `.once()`-registered callbacks
53 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should \
5 | --reporter spec
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/Readme.md:
--------------------------------------------------------------------------------
1 | # Emitter [](https://travis-ci.org/component/emitter)
2 |
3 | Event emitter component.
4 |
5 | ## Installation
6 |
7 | ```
8 | $ component install component/emitter
9 | ```
10 |
11 | ## API
12 |
13 | ### Emitter(obj)
14 |
15 | The `Emitter` may also be used as a mixin. For example
16 | a "plain" object may become an emitter, or you may
17 | extend an existing prototype.
18 |
19 | As an `Emitter` instance:
20 |
21 | ```js
22 | var Emitter = require('emitter');
23 | var emitter = new Emitter;
24 | emitter.emit('something');
25 | ```
26 |
27 | As a mixin:
28 |
29 | ```js
30 | var Emitter = require('emitter');
31 | var user = { name: 'tobi' };
32 | Emitter(user);
33 |
34 | user.emit('im a user');
35 | ```
36 |
37 | As a prototype mixin:
38 |
39 | ```js
40 | var Emitter = require('emitter');
41 | Emitter(User.prototype);
42 | ```
43 |
44 | ### Emitter#on(event, fn)
45 |
46 | Register an `event` handler `fn`.
47 |
48 | ### Emitter#once(event, fn)
49 |
50 | Register a single-shot `event` handler `fn`,
51 | removed immediately after it is invoked the
52 | first time.
53 |
54 | ### Emitter#off(event, fn)
55 |
56 | * Pass `event` and `fn` to remove a listener.
57 | * Pass `event` to remove all listeners on that event.
58 | * Pass nothing to remove all listeners on all events.
59 |
60 | ### Emitter#emit(event, ...)
61 |
62 | Emit an `event` with variable option args.
63 |
64 | ### Emitter#listeners(event)
65 |
66 | Return an array of callbacks, or an empty array.
67 |
68 | ### Emitter#hasListeners(event)
69 |
70 | Check if this emitter has `event` handlers.
71 |
72 | ## License
73 |
74 | MIT
75 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "emitter",
3 | "description": "Event emitter",
4 | "keywords": [
5 | "emitter",
6 | "events"
7 | ],
8 | "version": "1.1.2",
9 | "license": "MIT",
10 | "main": "index.js",
11 | "homepage": "https://github.com/component/emitter",
12 | "ignore": [
13 | "**/.*",
14 | "node_modules",
15 | "bower_components",
16 | "test",
17 | "Makefile",
18 | "package.json",
19 | "component.json"
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "emitter",
3 | "repo": "component/emitter",
4 | "description": "Event emitter",
5 | "keywords": [
6 | "emitter",
7 | "events"
8 | ],
9 | "version": "1.1.2",
10 | "scripts": [
11 | "index.js"
12 | ],
13 | "license": "MIT"
14 | }
15 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/component-emitter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "component-emitter",
3 | "description": "Event emitter",
4 | "version": "1.1.2",
5 | "devDependencies": {
6 | "mocha": "*",
7 | "should": "*"
8 | },
9 | "component": {
10 | "scripts": {
11 | "emitter/index.js": "index.js"
12 | }
13 | },
14 | "main": "index.js",
15 | "repository": {
16 | "type": "git",
17 | "url": "git+https://github.com/component/emitter.git"
18 | },
19 | "scripts": {
20 | "test": "make test"
21 | },
22 | "bugs": {
23 | "url": "https://github.com/component/emitter/issues"
24 | },
25 | "homepage": "https://github.com/component/emitter",
26 | "_id": "component-emitter@1.1.2",
27 | "dist": {
28 | "shasum": "296594f2753daa63996d2af08d15a95116c9aec3",
29 | "tarball": "http://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz"
30 | },
31 | "_from": "component-emitter@1.1.2",
32 | "_npmVersion": "1.3.24",
33 | "_npmUser": {
34 | "name": "tootallnate",
35 | "email": "nathan@tootallnate.net"
36 | },
37 | "maintainers": [
38 | {
39 | "name": "tootallnate",
40 | "email": "nathan@tootallnate.net"
41 | }
42 | ],
43 | "directories": {},
44 | "_shasum": "296594f2753daa63996d2af08d15a95116c9aec3",
45 | "_resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz",
46 | "readme": "ERROR: No README data found!"
47 | }
48 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/debug/index.js:
--------------------------------------------------------------------------------
1 | if ('undefined' == typeof window) {
2 | module.exports = require('./lib/debug');
3 | } else {
4 | module.exports = require('./debug');
5 | }
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/debug/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "debug",
3 | "version": "0.7.4",
4 | "repository": {
5 | "type": "git",
6 | "url": "git://github.com/visionmedia/debug.git"
7 | },
8 | "description": "small debugging utility",
9 | "keywords": [
10 | "debug",
11 | "log",
12 | "debugger"
13 | ],
14 | "author": {
15 | "name": "TJ Holowaychuk",
16 | "email": "tj@vision-media.ca"
17 | },
18 | "dependencies": {},
19 | "devDependencies": {
20 | "mocha": "*"
21 | },
22 | "main": "lib/debug.js",
23 | "browser": "./debug.js",
24 | "engines": {
25 | "node": "*"
26 | },
27 | "files": [
28 | "lib/debug.js",
29 | "debug.js",
30 | "index.js"
31 | ],
32 | "component": {
33 | "scripts": {
34 | "debug/index.js": "index.js",
35 | "debug/debug.js": "debug.js"
36 | }
37 | },
38 | "bugs": {
39 | "url": "https://github.com/visionmedia/debug/issues"
40 | },
41 | "homepage": "https://github.com/visionmedia/debug",
42 | "_id": "debug@0.7.4",
43 | "dist": {
44 | "shasum": "06e1ea8082c2cb14e39806e22e2f6f757f92af39",
45 | "tarball": "http://registry.npmjs.org/debug/-/debug-0.7.4.tgz"
46 | },
47 | "_from": "debug@0.7.4",
48 | "_npmVersion": "1.3.13",
49 | "_npmUser": {
50 | "name": "tjholowaychuk",
51 | "email": "tj@vision-media.ca"
52 | },
53 | "maintainers": [
54 | {
55 | "name": "tjholowaychuk",
56 | "email": "tj@vision-media.ca"
57 | }
58 | ],
59 | "directories": {},
60 | "_shasum": "06e1ea8082c2cb14e39806e22e2f6f757f92af39",
61 | "_resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
62 | "readme": "ERROR: No README data found!"
63 | }
64 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/.npmignore:
--------------------------------------------------------------------------------
1 | support/
2 | test
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.10"
4 | notifications:
5 | irc: "irc.freenode.org#socket.io"
6 | matrix:
7 | include:
8 | - node_js: '0.10'
9 | env: BROWSER_NAME=chrome BROWSER_VERSION=latest
10 | - node_js: '0.10'
11 | env: BROWSER_NAME=safari BROWSER_VERSION=latest
12 | - node_js: '0.10'
13 | env: BROWSER_NAME=ie BROWSER_VERSION=6
14 | - node_js: '0.10'
15 | env: BROWSER_NAME=ie BROWSER_VERSION=7
16 | - node_js: '0.10'
17 | env: BROWSER_NAME=ie BROWSER_VERSION=8
18 | - node_js: '0.10'
19 | env: BROWSER_NAME=ie BROWSER_VERSION=9
20 | - node_js: '0.10'
21 | env: BROWSER_NAME=ie BROWSER_VERSION=10 BROWSER_PLATFORM="Windows 2012"
22 | - node_js: '0.10'
23 | env: BROWSER_NAME=ie BROWSER_VERSION=latest BROWSER_PLATFORM="Windows 2012"
24 | - node_js: '0.10'
25 | env: BROWSER_NAME=iphone BROWSER_VERSION=4.3
26 | - node_js: '0.10'
27 | env: BROWSER_NAME=iphone BROWSER_VERSION=5.1
28 | - node_js: '0.10'
29 | env: BROWSER_NAME=iphone BROWSER_VERSION=6.1
30 | - node_js: '0.10'
31 | env: BROWSER_NAME=iphone BROWSER_VERSION=7.1
32 | - node_js: '0.10'
33 | env: BROWSER_NAME=android BROWSER_VERSION=4.0
34 | - node_js: '0.10'
35 | env: BROWSER_NAME=android BROWSER_VERSION=4.1
36 | - node_js: '0.10'
37 | env: BROWSER_NAME=android BROWSER_VERSION=4.2
38 | - node_js: '0.10'
39 | env: BROWSER_NAME=android BROWSER_VERSION=4.3
40 | - node_js: '0.10'
41 | env: BROWSER_NAME=android BROWSER_VERSION=4.4
42 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/.zuul.yml:
--------------------------------------------------------------------------------
1 | ui: mocha-bdd
2 | server: ./test/support/server.js
3 | browsers:
4 | - name: chrome
5 | version: 29..latest
6 | # Firefox disabled for now because it can cause infinite wait loops when
7 | # running any tests
8 | # - name: firefox
9 | # version: latest
10 | - name: safari
11 | version: latest
12 | - name: ie
13 | version: 10
14 | platform: Windows 2012
15 | - name: ie
16 | version: [6..9, latest]
17 | - name: iphone
18 | version: oldest..latest
19 | - name: android
20 | version: oldest..latest
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/Makefile:
--------------------------------------------------------------------------------
1 |
2 | REPORTER = dot
3 |
4 | build: engine.io.js
5 |
6 | engine.io.js: lib/*.js lib/transports/*.js package.json
7 | @./support/browserify.sh > engine.io.js
8 |
9 | test:
10 | @if [ "x$(BROWSER_NAME)" = "x" ]; then make test-node; else make test-zuul; fi
11 |
12 | test-node:
13 | @./node_modules/.bin/mocha \
14 | --reporter $(REPORTER) \
15 | test/index.js
16 |
17 | test-zuul:
18 | @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \
19 | ./node_modules/zuul/bin/zuul \
20 | --browser-name $(BROWSER_NAME) \
21 | --browser-version $(BROWSER_VERSION) \
22 | test/index.js; \
23 | else \
24 | ./node_modules/zuul/bin/zuul \
25 | --browser-name $(BROWSER_NAME) \
26 | --browser-version $(BROWSER_VERSION) \
27 | --browser-platform "$(BROWSER_PLATFORM)" \
28 | test/index.js; \
29 | fi
30 |
31 | test-cov:
32 | @./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \
33 | --require ./test/common \
34 | --reporter $(REPORTER) \
35 | $(TESTS)
36 |
37 | .PHONY: test build
38 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/');
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/lib/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./socket');
3 |
4 | /**
5 | * Exports parser
6 | *
7 | * @api public
8 | *
9 | */
10 | module.exports.parser = require('engine.io-parser');
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/lib/transports/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies
3 | */
4 |
5 | var XMLHttpRequest = require('xmlhttprequest');
6 | var XHR = require('./polling-xhr');
7 | var JSONP = require('./polling-jsonp');
8 | var websocket = require('./websocket');
9 |
10 | /**
11 | * Export transports.
12 | */
13 |
14 | exports.polling = polling;
15 | exports.websocket = websocket;
16 |
17 | /**
18 | * Polling transport polymorphic constructor.
19 | * Decides on xhr vs jsonp based on feature detection.
20 | *
21 | * @api private
22 | */
23 |
24 | function polling(opts){
25 | var xhr;
26 | var xd = false;
27 | var xs = false;
28 | var jsonp = false !== opts.jsonp;
29 |
30 | if (global.location) {
31 | var isSSL = 'https:' == location.protocol;
32 | var port = location.port;
33 |
34 | // some user agents have empty `location.port`
35 | if (!port) {
36 | port = isSSL ? 443 : 80;
37 | }
38 |
39 | xd = opts.hostname != location.hostname || port != opts.port;
40 | xs = opts.secure != isSSL;
41 | }
42 |
43 | opts.xdomain = xd;
44 | opts.xscheme = xs;
45 | xhr = new XMLHttpRequest(opts);
46 |
47 | if ('open' in xhr && !opts.forceJSONP) {
48 | return new XHR(opts);
49 | } else {
50 | if (!jsonp) throw new Error('JSONP disabled');
51 | return new JSONP(opts);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/lib/xmlhttprequest.js:
--------------------------------------------------------------------------------
1 | // browser shim for xmlhttprequest module
2 | var hasCORS = require('has-cors');
3 |
4 | module.exports = function(opts) {
5 | var xdomain = opts.xdomain;
6 |
7 | // scheme must be same when usign XDomainRequest
8 | // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
9 | var xscheme = opts.xscheme;
10 |
11 | // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default.
12 | // https://github.com/Automattic/engine.io-client/pull/217
13 | var enablesXDR = opts.enablesXDR;
14 |
15 | // XMLHttpRequest can be disabled on IE
16 | try {
17 | if ('undefined' != typeof XMLHttpRequest && (!xdomain || hasCORS)) {
18 | return new XMLHttpRequest();
19 | }
20 | } catch (e) { }
21 |
22 | // Use XDomainRequest for IE8 if enablesXDR is true
23 | // because loading bar keeps flashing when using jsonp-polling
24 | // https://github.com/yujiosaka/socke.io-ie8-loading-example
25 | try {
26 | if ('undefined' != typeof XDomainRequest && !xscheme && enablesXDR) {
27 | return new XDomainRequest();
28 | }
29 | } catch (e) { }
30 |
31 | if (!xdomain) {
32 | try {
33 | return new ActiveXObject('Microsoft.XMLHTTP');
34 | } catch(e) { }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 | node_modules
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/History.md:
--------------------------------------------------------------------------------
1 |
2 | 0.0.2 / 2012-09-03
3 | ==================
4 |
5 | * fix typo in package.json
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | test:
12 | @node_modules/.bin/mocha \
13 | --require should \
14 | --reporter spec
15 |
16 | .PHONY: clean test
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/Readme.md:
--------------------------------------------------------------------------------
1 | # inherit
2 |
3 | Prototype inheritance utility.
4 |
5 | ## Installation
6 |
7 | ```
8 | $ component install component/inherit
9 | ```
10 |
11 | ## Example
12 |
13 | ```js
14 | var inherit = require('inherit');
15 |
16 | function Human() {}
17 | function Woman() {}
18 |
19 | inherit(Woman, Human);
20 | ```
21 |
22 | ## License
23 |
24 | MIT
25 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "inherit",
3 | "description": "Prototype inheritance utility",
4 | "version": "0.0.3",
5 | "keywords": ["inherit", "utility"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = function(a, b){
3 | var fn = function(){};
4 | fn.prototype = b.prototype;
5 | a.prototype = new fn;
6 | a.prototype.constructor = a;
7 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "component-inherit",
3 | "description": "Prototype inheritance utility",
4 | "version": "0.0.3",
5 | "keywords": [
6 | "inherit",
7 | "utility"
8 | ],
9 | "dependencies": {},
10 | "component": {
11 | "scripts": {
12 | "inherit/index.js": "index.js"
13 | }
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git+https://github.com/component/inherit.git"
18 | },
19 | "bugs": {
20 | "url": "https://github.com/component/inherit/issues"
21 | },
22 | "homepage": "https://github.com/component/inherit",
23 | "_id": "component-inherit@0.0.3",
24 | "dist": {
25 | "shasum": "645fc4adf58b72b649d5cae65135619db26ff143",
26 | "tarball": "http://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz"
27 | },
28 | "_from": "component-inherit@0.0.3",
29 | "_npmVersion": "1.3.24",
30 | "_npmUser": {
31 | "name": "coreh",
32 | "email": "thecoreh@gmail.com"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "coreh",
37 | "email": "thecoreh@gmail.com"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "645fc4adf58b72b649d5cae65135619db26ff143",
42 | "_resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/component-inherit/test/inherit.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var inherit = require('..');
7 |
8 | describe('inherit(a, b)', function(){
9 | it('should inherit b\'s prototype', function(){
10 | function Loki(){}
11 | function Animal(){}
12 |
13 | Animal.prototype.species = 'unknown';
14 |
15 | inherit(Loki, Animal);
16 |
17 | var loki = new Loki;
18 | loki.species.should.equal('unknown');
19 | loki.constructor.should.equal(Loki);
20 | })
21 | })
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "laxbreak": true
3 | }
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | example
5 | *.sock
6 | dist
7 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/Makefile:
--------------------------------------------------------------------------------
1 |
2 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773
3 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
4 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
5 |
6 | # BIN directory
7 | BIN := $(THIS_DIR)/node_modules/.bin
8 |
9 | # applications
10 | NODE ?= $(shell which node)
11 | NPM ?= $(NODE) $(shell which npm)
12 | BROWSERIFY ?= $(NODE) $(BIN)/browserify
13 |
14 | all: dist/debug.js
15 |
16 | install: node_modules
17 |
18 | clean:
19 | @rm -rf node_modules dist
20 |
21 | dist:
22 | @mkdir -p $@
23 |
24 | dist/debug.js: node_modules browser.js debug.js dist
25 | @$(BROWSERIFY) \
26 | --standalone debug \
27 | . > $@
28 |
29 | node_modules: package.json
30 | @NODE_ENV= $(NPM) install
31 | @touch node_modules
32 |
33 | .PHONY: all install clean
34 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "debug",
3 | "repo": "visionmedia/debug",
4 | "description": "small debugging utility",
5 | "version": "1.0.4",
6 | "keywords": [
7 | "debug",
8 | "log",
9 | "debugger"
10 | ],
11 | "main": "browser.js",
12 | "scripts": [
13 | "browser.js",
14 | "debug.js"
15 | ],
16 | "dependencies": {
17 | "guille/ms.js": "0.6.1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/node_modules/ms/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test
3 | History.md
4 | Makefile
5 | component.json
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/node_modules/ms/README.md:
--------------------------------------------------------------------------------
1 | # ms.js: miliseconds conversion utility
2 |
3 | ```js
4 | ms('1d') // 86400000
5 | ms('10h') // 36000000
6 | ms('2h') // 7200000
7 | ms('1m') // 60000
8 | ms('5s') // 5000
9 | ms('100') // 100
10 | ```
11 |
12 | ```js
13 | ms(60000) // "1m"
14 | ms(2 * 60000) // "2m"
15 | ms(ms('10 hours')) // "10h"
16 | ```
17 |
18 | ```js
19 | ms(60000, { long: true }) // "1 minute"
20 | ms(2 * 60000, { long: true }) // "2 minutes"
21 | ms(ms('10 hours', { long: true })) // "10 hours"
22 | ```
23 |
24 | - Node/Browser compatible. Published as `ms` in NPM.
25 | - If a number is supplied to `ms`, a string with a unit is returned.
26 | - If a string that contains the number is supplied, it returns it as
27 | a number (e.g: it returns `100` for `'100'`).
28 | - If you pass a string with a number and a valid unit, the number of
29 | equivalent ms is returned.
30 |
31 | ## License
32 |
33 | MIT
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/debug/node_modules/ms/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ms",
3 | "version": "0.6.2",
4 | "description": "Tiny ms conversion utility",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/guille/ms.js.git"
8 | },
9 | "main": "./index",
10 | "devDependencies": {
11 | "mocha": "*",
12 | "expect.js": "*",
13 | "serve": "*"
14 | },
15 | "component": {
16 | "scripts": {
17 | "ms/index.js": "index.js"
18 | }
19 | },
20 | "bugs": {
21 | "url": "https://github.com/guille/ms.js/issues"
22 | },
23 | "_id": "ms@0.6.2",
24 | "dist": {
25 | "shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c",
26 | "tarball": "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz"
27 | },
28 | "_from": "ms@0.6.2",
29 | "_npmVersion": "1.2.30",
30 | "_npmUser": {
31 | "name": "rauchg",
32 | "email": "rauchg@gmail.com"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "rauchg",
37 | "email": "rauchg@gmail.com"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "d89c2124c6fdc1353d65a8b77bf1aac4b193708c",
42 | "_resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
43 | "readme": "ERROR: No README data found!",
44 | "homepage": "https://github.com/guille/ms.js#readme"
45 | }
46 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/.npmignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.csv
5 | *.dat
6 | *.out
7 | *.pid
8 | *.gz
9 |
10 | pids
11 | logs
12 | results
13 |
14 | npm-debug.log
15 | node_modules/*
16 |
17 | test
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/.zuul.yml:
--------------------------------------------------------------------------------
1 | ui: mocha-bdd
2 | browsers:
3 | - name: chrome
4 | version: 29..latest
5 | - name: firefox
6 | version: latest
7 | - name: safari
8 | version: latest
9 | - name: ie
10 | version: 10
11 | platform: Windows 2012
12 | - name: ie
13 | version: 9
14 | version: [6..9, latest]
15 | - name: iphone
16 | version: oldest..latest
17 | - name: android
18 | version: latest
19 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2014 Automattic
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | 'Software'), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/Makefile:
--------------------------------------------------------------------------------
1 |
2 | REPORTER = dot
3 |
4 | test:
5 | @if [ "x$(BROWSER_NAME)" = "x" ]; then make test-node; else make test-zuul; fi
6 |
7 | test-node:
8 | @./node_modules/.bin/mocha \
9 | --reporter $(REPORTER) \
10 | test/index.js
11 |
12 | test-zuul:
13 | @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \
14 | ./node_modules/zuul/bin/zuul \
15 | --browser-name $(BROWSER_NAME) \
16 | --browser-version $(BROWSER_VERSION) \
17 | test/index.js; \
18 | else \
19 | ./node_modules/zuul/bin/zuul \
20 | --browser-name $(BROWSER_NAME) \
21 | --browser-version $(BROWSER_VERSION) \
22 | --browser-platform "$(BROWSER_PLATFORM)" \
23 | test/index.js; \
24 | fi
25 |
26 | .PHONY: test
27 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/');
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/lib/keys.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Gets the keys for an object.
4 | *
5 | * @return {Array} keys
6 | * @api private
7 | */
8 |
9 | module.exports = Object.keys || function keys (obj){
10 | var arr = [];
11 | var has = Object.prototype.hasOwnProperty;
12 |
13 | for (var i in obj) {
14 | if (has.call(obj, i)) {
15 | arr.push(i);
16 | }
17 | }
18 | return arr;
19 | };
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/after/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .monitor
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/after/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.6
4 | - 0.8
5 | - 0.9
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/after/LICENCE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011 Raynos.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/after/index.js:
--------------------------------------------------------------------------------
1 | module.exports = after
2 |
3 | function after(count, callback, err_cb) {
4 | var bail = false
5 | err_cb = err_cb || noop
6 | proxy.count = count
7 |
8 | return (count === 0) ? callback() : proxy
9 |
10 | function proxy(err, result) {
11 | if (proxy.count <= 0) {
12 | throw new Error('after called too many times')
13 | }
14 | --proxy.count
15 |
16 | // after first error, rest are passed to err_cb
17 | if (err) {
18 | bail = true
19 | callback(err)
20 | // future error callbacks will go to error handler
21 | callback = err_cb
22 | } else if (proxy.count === 0 && !bail) {
23 | callback(null, result)
24 | }
25 | }
26 | }
27 |
28 | function noop() {}
29 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/after/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "after",
3 | "description": "after - tiny flow control",
4 | "version": "0.8.1",
5 | "author": {
6 | "name": "Raynos",
7 | "email": "raynos2@gmail.com"
8 | },
9 | "contributors": [
10 | {
11 | "name": "Raynos",
12 | "email": "raynos2@gmail.com",
13 | "url": "http://raynos.org"
14 | }
15 | ],
16 | "scripts": {
17 | "test": "mocha --ui tdd --reporter spec test/*.js"
18 | },
19 | "devDependencies": {
20 | "mocha": "~1.8.1"
21 | },
22 | "keywords": [
23 | "flowcontrol",
24 | "after",
25 | "flow",
26 | "control",
27 | "arch"
28 | ],
29 | "repository": {
30 | "type": "git",
31 | "url": "git://github.com/Raynos/after.git"
32 | },
33 | "bugs": {
34 | "url": "https://github.com/Raynos/after/issues"
35 | },
36 | "_id": "after@0.8.1",
37 | "dist": {
38 | "shasum": "ab5d4fb883f596816d3515f8f791c0af486dd627",
39 | "tarball": "http://registry.npmjs.org/after/-/after-0.8.1.tgz"
40 | },
41 | "_from": "after@0.8.1",
42 | "_npmVersion": "1.2.25",
43 | "_npmUser": {
44 | "name": "raynos",
45 | "email": "raynos2@gmail.com"
46 | },
47 | "maintainers": [
48 | {
49 | "name": "raynos",
50 | "email": "raynos2@gmail.com"
51 | },
52 | {
53 | "name": "shtylman",
54 | "email": "shtylman@gmail.com"
55 | }
56 | ],
57 | "directories": {},
58 | "_shasum": "ab5d4fb883f596816d3515f8f791c0af486dd627",
59 | "_resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz",
60 | "readme": "ERROR: No README data found!",
61 | "homepage": "https://github.com/Raynos/after#readme"
62 | }
63 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/arraybuffer.slice/.npmignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | lcov.info
3 | *.seed
4 | *.log
5 | *.csv
6 | *.dat
7 | *.out
8 | *.pid
9 | *.gz
10 |
11 | pids
12 | logs
13 | results
14 | build
15 | .grunt
16 |
17 | node_modules
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/arraybuffer.slice/Makefile:
--------------------------------------------------------------------------------
1 |
2 | REPORTER = dot
3 |
4 | test:
5 | @./node_modules/.bin/mocha \
6 | --reporter $(REPORTER)
7 |
8 | .PHONY: test
9 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/arraybuffer.slice/README.md:
--------------------------------------------------------------------------------
1 | # How to
2 | ```javascript
3 | var sliceBuffer = require('arraybuffer.slice');
4 | var ab = (new Int8Array(5)).buffer;
5 | var sliced = sliceBuffer(ab, 1, 3);
6 | sliced = sliceBuffer(ab, 1);
7 | ```
8 |
9 | # Licence (MIT)
10 | Copyright (C) 2013 Rase-
11 |
12 |
13 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/arraybuffer.slice/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * An abstraction for slicing an arraybuffer even when
3 | * ArrayBuffer.prototype.slice is not supported
4 | *
5 | * @api public
6 | */
7 |
8 | module.exports = function(arraybuffer, start, end) {
9 | var bytes = arraybuffer.byteLength;
10 | start = start || 0;
11 | end = end || bytes;
12 |
13 | if (arraybuffer.slice) { return arraybuffer.slice(start, end); }
14 |
15 | if (start < 0) { start += bytes; }
16 | if (end < 0) { end += bytes; }
17 | if (end > bytes) { end = bytes; }
18 |
19 | if (start >= bytes || start >= end || bytes === 0) {
20 | return new ArrayBuffer(0);
21 | }
22 |
23 | var abv = new Uint8Array(arraybuffer);
24 | var result = new Uint8Array(end - start);
25 | for (var i = start, ii = 0; i < end; i++, ii++) {
26 | result[ii] = abv[i];
27 | }
28 | return result.buffer;
29 | };
30 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/arraybuffer.slice/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "arraybuffer.slice",
3 | "description": "Exports a function for slicing ArrayBuffers (no polyfilling)",
4 | "version": "0.0.6",
5 | "homepage": "https://github.com/rase-/arraybuffer.slice",
6 | "dependencies": {},
7 | "devDependencies": {
8 | "mocha": "1.17.1",
9 | "expect.js": "0.2.0"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+ssh://git@github.com/rase-/arraybuffer.slice.git"
14 | },
15 | "bugs": {
16 | "url": "https://github.com/rase-/arraybuffer.slice/issues"
17 | },
18 | "_id": "arraybuffer.slice@0.0.6",
19 | "dist": {
20 | "shasum": "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca",
21 | "tarball": "http://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz"
22 | },
23 | "_from": "arraybuffer.slice@0.0.6",
24 | "_npmVersion": "1.3.5",
25 | "_npmUser": {
26 | "name": "rase-",
27 | "email": "tonykovanen@hotmail.com"
28 | },
29 | "maintainers": [
30 | {
31 | "name": "rase-",
32 | "email": "tonykovanen@hotmail.com"
33 | }
34 | ],
35 | "directories": {},
36 | "_shasum": "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca",
37 | "_resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz",
38 | "readme": "ERROR: No README data found!"
39 | }
40 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/.npmignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/.travis.yml:
--------------------------------------------------------------------------------
1 | ---
2 | language: node_js
3 | node_js:
4 | - '0.10'
5 | before_script:
6 | - npm install
7 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/LICENSE-MIT:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Niklas von Hertzen
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/README.md:
--------------------------------------------------------------------------------
1 | # base64-arraybuffer
2 |
3 | [](https://travis-ci.org/niklasvh/base64-arraybuffer)
4 |
5 | Encode/decode base64 data into ArrayBuffers
6 |
7 | ## Getting Started
8 | Install the module with: `npm install base64-arraybuffer`
9 |
10 | ## API
11 | The library encodes and decodes base64 to and from ArrayBuffers
12 |
13 | - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
14 | - __decode(str)__ - Decodes base64 string to `ArrayBuffer`
15 |
16 | ## Release History
17 |
18 | - 0.1.2 - Fix old format of typed arrays
19 | - 0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer
20 |
21 | ## License
22 | Copyright (c) 2012 Niklas von Hertzen
23 | Licensed under the MIT license.
24 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/README.md~:
--------------------------------------------------------------------------------
1 | # base64-arraybuffer
2 |
3 | [](https://travis-ci.org/niklasvh/base64-arraybuffer)
4 |
5 | Encode/decode base64 data into ArrayBuffers
6 |
7 | ## Getting Started
8 | Install the module with: `npm install base64-arraybuffer`
9 |
10 | ## API
11 | The library encodes and decodes base64 to and from ArrayBuffers
12 |
13 | - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
14 | - __decode(str)__ - Decodes base64 string to `ArrayBuffer`
15 |
16 | ## Release History
17 |
18 | - 0.1.2 - Fix old format of typed arrays
19 | - 0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer
20 |
21 | ## License
22 | Copyright (c) 2012 Niklas von Hertzen
23 | Licensed under the MIT license.
24 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/grunt.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 | "use strict";
3 | // Project configuration.
4 | grunt.initConfig({
5 | pkg: '',
6 | test: {
7 | files: ['test/**/*.js']
8 | },
9 | lint: {
10 | files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
11 | },
12 | watch: {
13 | files: '',
14 | tasks: 'default'
15 | },
16 | jshint: {
17 | options: {
18 | curly: true,
19 | eqeqeq: true,
20 | immed: true,
21 | latedef: true,
22 | newcap: true,
23 | noarg: true,
24 | sub: true,
25 | undef: true,
26 | boss: true,
27 | eqnull: true,
28 | node: true
29 | },
30 | globals: {
31 | exports: true
32 | }
33 | }
34 | });
35 |
36 | // Default task.
37 | grunt.registerTask('default', 'test');
38 |
39 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "base64-arraybuffer",
3 | "description": "Encode/decode base64 data into ArrayBuffers",
4 | "version": "0.1.2",
5 | "homepage": "https://github.com/niklasvh/base64-arraybuffer",
6 | "author": {
7 | "name": "Niklas von Hertzen",
8 | "email": "niklasvh@gmail.com",
9 | "url": "http://hertzen.com"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/niklasvh/base64-arraybuffer.git"
14 | },
15 | "bugs": {
16 | "url": "https://github.com/niklasvh/base64-arraybuffer/issues"
17 | },
18 | "licenses": [
19 | {
20 | "type": "MIT",
21 | "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT"
22 | }
23 | ],
24 | "main": "lib/base64-arraybuffer",
25 | "engines": {
26 | "node": ">= 0.6.0"
27 | },
28 | "scripts": {
29 | "test": "grunt test"
30 | },
31 | "devDependencies": {
32 | "grunt": "~0.3.17"
33 | },
34 | "keywords": [],
35 | "_id": "base64-arraybuffer@0.1.2",
36 | "dist": {
37 | "shasum": "474df4a9f2da24e05df3158c3b1db3c3cd46a154",
38 | "tarball": "http://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz"
39 | },
40 | "_from": "base64-arraybuffer@0.1.2",
41 | "_npmVersion": "1.3.21",
42 | "_npmUser": {
43 | "name": "niklasvh",
44 | "email": "niklasvh@gmail.com"
45 | },
46 | "maintainers": [
47 | {
48 | "name": "niklasvh",
49 | "email": "niklasvh@gmail.com"
50 | }
51 | ],
52 | "directories": {},
53 | "_shasum": "474df4a9f2da24e05df3158c3b1db3c3cd46a154",
54 | "_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz",
55 | "readme": "ERROR: No README data found!"
56 | }
57 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/base64-arraybuffer/package.json~:
--------------------------------------------------------------------------------
1 | {
2 | "name": "base64-arraybuffer",
3 | "description": "Encode/decode base64 data into ArrayBuffers",
4 | "version": "0.1.1",
5 | "homepage": "https://github.com/niklasvh/base64-arraybuffer",
6 | "author": {
7 | "name": "Niklas von Hertzen",
8 | "email": "niklasvh@gmail.com",
9 | "url": "http://hertzen.com"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "https://github.com/niklasvh/base64-arraybuffer"
14 | },
15 | "bugs": {
16 | "url": "https://github.com/niklasvh/base64-arraybuffer/issues"
17 | },
18 | "licenses": [
19 | {
20 | "type": "MIT",
21 | "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT"
22 | }
23 | ],
24 | "main": "lib/base64-arraybuffer",
25 | "engines": {
26 | "node": ">= 0.6.0"
27 | },
28 | "scripts": {
29 | "test": "grunt test"
30 | },
31 | "devDependencies": {
32 | "grunt": "~0.3.17"
33 | },
34 | "keywords": []
35 | }
36 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | blob.js
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/.zuul.yml:
--------------------------------------------------------------------------------
1 | ui: mocha-bdd
2 | browsers:
3 | - name: chrome
4 | version: [8, latest]
5 | - name: ie
6 | version: 10
7 | - name: android
8 | version: latest
9 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/Makefile:
--------------------------------------------------------------------------------
1 | REPORTER = dot
2 |
3 | build: blob.js
4 |
5 | blob.js:
6 | @./node_modules/.bin/browserify --standalone blob index.js > blob.js
7 |
8 | test:
9 | @./node_modules/.bin/zuul -- test/index.js
10 |
11 | clean:
12 | rm blob.js
13 |
14 | .PHONY: test blob.js
15 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/README.md:
--------------------------------------------------------------------------------
1 | Blob
2 | ====
3 |
4 | A module that exports a constructor that uses window.Blob when available, and a BlobBuilder with any vendor prefix in other cases. If neither is available, it exports undefined.
5 |
6 | Usage:
7 |
8 | ```javascript
9 | var Blob = require('blob');
10 | var b = new Blob(['hi', 'constructing', 'a', 'blob']);
11 | ```
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Create a blob builder even when vendor prefixes exist
3 | */
4 |
5 | var BlobBuilder = global.BlobBuilder
6 | || global.WebKitBlobBuilder
7 | || global.MSBlobBuilder
8 | || global.MozBlobBuilder;
9 |
10 | /**
11 | * Check if Blob constructor is supported
12 | */
13 |
14 | var blobSupported = (function() {
15 | try {
16 | var b = new Blob(['hi']);
17 | return b.size == 2;
18 | } catch(e) {
19 | return false;
20 | }
21 | })();
22 |
23 | /**
24 | * Check if BlobBuilder is supported
25 | */
26 |
27 | var blobBuilderSupported = BlobBuilder
28 | && BlobBuilder.prototype.append
29 | && BlobBuilder.prototype.getBlob;
30 |
31 | function BlobBuilderConstructor(ary, options) {
32 | options = options || {};
33 |
34 | var bb = new BlobBuilder();
35 | for (var i = 0; i < ary.length; i++) {
36 | bb.append(ary[i]);
37 | }
38 | return (options.type) ? bb.getBlob(options.type) : bb.getBlob();
39 | };
40 |
41 | module.exports = (function() {
42 | if (blobSupported) {
43 | return global.Blob;
44 | } else if (blobBuilderSupported) {
45 | return BlobBuilderConstructor;
46 | } else {
47 | return undefined;
48 | }
49 | })();
50 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/blob/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "blob",
3 | "description": "Abstracts out Blob and uses BlobBulder in cases where it is supported with any vendor prefix.",
4 | "version": "0.0.2",
5 | "homepage": "https://github.com/rase-/blob",
6 | "dependencies": {},
7 | "devDependencies": {
8 | "mocha": "1.17.1",
9 | "expect.js": "0.2.0",
10 | "zuul": "1.5.4",
11 | "browserify": "3.30.1"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+ssh://git@github.com/rase-/blob.git"
16 | },
17 | "scripts": {
18 | "test": "make test"
19 | },
20 | "bugs": {
21 | "url": "https://github.com/rase-/blob/issues"
22 | },
23 | "_id": "blob@0.0.2",
24 | "dist": {
25 | "shasum": "b89562bd6994af95ba1e812155536333aa23cf24",
26 | "tarball": "http://registry.npmjs.org/blob/-/blob-0.0.2.tgz"
27 | },
28 | "_from": "blob@0.0.2",
29 | "_npmVersion": "1.3.5",
30 | "_npmUser": {
31 | "name": "rase-",
32 | "email": "tonykovanen@hotmail.com"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "rase-",
37 | "email": "tonykovanen@hotmail.com"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "b89562bd6994af95ba1e812155536333aa23cf24",
42 | "_resolved": "https://registry.npmjs.org/blob/-/blob-0.0.2.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/.npmignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.csv
5 | *.dat
6 | *.out
7 | *.pid
8 | *.gz
9 |
10 | pids
11 | logs
12 | results
13 |
14 | npm-debug.log
15 | node_modules
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/History.md:
--------------------------------------------------------------------------------
1 |
2 | 0.1.5 / 2014-09-04
3 | ==================
4 |
5 | * prevent browserify from bundling `Buffer`
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Kevin Roark
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/README.md:
--------------------------------------------------------------------------------
1 | has-binarydata.js
2 | =================
3 |
4 | Simple module to test if an object contains binary data
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/index.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Module requirements.
4 | */
5 |
6 | var isArray = require('isarray');
7 |
8 | /**
9 | * Module exports.
10 | */
11 |
12 | module.exports = hasBinary;
13 |
14 | /**
15 | * Checks for binary data.
16 | *
17 | * Right now only Buffer and ArrayBuffer are supported..
18 | *
19 | * @param {Object} anything
20 | * @api public
21 | */
22 |
23 | function hasBinary(data) {
24 |
25 | function _hasBinary(obj) {
26 | if (!obj) return false;
27 |
28 | if ( (global.Buffer && global.Buffer.isBuffer(obj)) ||
29 | (global.ArrayBuffer && obj instanceof ArrayBuffer) ||
30 | (global.Blob && obj instanceof Blob) ||
31 | (global.File && obj instanceof File)
32 | ) {
33 | return true;
34 | }
35 |
36 | if (isArray(obj)) {
37 | for (var i = 0; i < obj.length; i++) {
38 | if (_hasBinary(obj[i])) {
39 | return true;
40 | }
41 | }
42 | } else if (obj && 'object' == typeof obj) {
43 | if (obj.toJSON) {
44 | obj = obj.toJSON();
45 | }
46 |
47 | for (var key in obj) {
48 | if (obj.hasOwnProperty(key) && _hasBinary(obj[key])) {
49 | return true;
50 | }
51 | }
52 | }
53 |
54 | return false;
55 | }
56 |
57 | return _hasBinary(data);
58 | }
59 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/node_modules/isarray/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "isarray",
3 | "description" : "Array#isArray for older browsers",
4 | "version" : "0.0.1",
5 | "repository" : "juliangruber/isarray",
6 | "homepage": "https://github.com/juliangruber/isarray",
7 | "main" : "index.js",
8 | "scripts" : [
9 | "index.js"
10 | ],
11 | "dependencies" : {},
12 | "keywords": ["browser","isarray","array"],
13 | "author": {
14 | "name": "Julian Gruber",
15 | "email": "mail@juliangruber.com",
16 | "url": "http://juliangruber.com"
17 | },
18 | "license": "MIT"
19 | }
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/node_modules/isarray/index.js:
--------------------------------------------------------------------------------
1 | module.exports = Array.isArray || function (arr) {
2 | return Object.prototype.toString.call(arr) == '[object Array]';
3 | };
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/node_modules/isarray/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "isarray",
3 | "description": "Array#isArray for older browsers",
4 | "version": "0.0.1",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/juliangruber/isarray.git"
8 | },
9 | "homepage": "https://github.com/juliangruber/isarray",
10 | "main": "index.js",
11 | "scripts": {
12 | "test": "tap test/*.js"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "tap": "*"
17 | },
18 | "keywords": [
19 | "browser",
20 | "isarray",
21 | "array"
22 | ],
23 | "author": {
24 | "name": "Julian Gruber",
25 | "email": "mail@juliangruber.com",
26 | "url": "http://juliangruber.com"
27 | },
28 | "license": "MIT",
29 | "_id": "isarray@0.0.1",
30 | "dist": {
31 | "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
32 | "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
33 | },
34 | "_from": "isarray@0.0.1",
35 | "_npmVersion": "1.2.18",
36 | "_npmUser": {
37 | "name": "juliangruber",
38 | "email": "julian@juliangruber.com"
39 | },
40 | "maintainers": [
41 | {
42 | "name": "juliangruber",
43 | "email": "julian@juliangruber.com"
44 | }
45 | ],
46 | "directories": {},
47 | "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
48 | "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
49 | "bugs": {
50 | "url": "https://github.com/juliangruber/isarray/issues"
51 | },
52 | "readme": "ERROR: No README data found!"
53 | }
54 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "has-binary",
3 | "version": "0.1.5",
4 | "description": "A function that takes anything in javascript and returns true if its argument contains binary data.",
5 | "dependencies": {
6 | "isarray": "0.0.1"
7 | },
8 | "devDependencies": {
9 | "better-assert": "1.0.0",
10 | "mocha": "1.17.1"
11 | },
12 | "author": {
13 | "name": "Kevin Roark"
14 | },
15 | "license": "MIT",
16 | "gitHead": "9034d3f6822521245b2507633b7d4eb54dc5ec91",
17 | "_id": "has-binary@0.1.5",
18 | "scripts": {},
19 | "_shasum": "95e75720ff31b72a3ba89a5b6dce082e4bc6467f",
20 | "_from": "has-binary@0.1.5",
21 | "_npmVersion": "1.4.25",
22 | "_npmUser": {
23 | "name": "rauchg",
24 | "email": "rauchg@gmail.com"
25 | },
26 | "maintainers": [
27 | {
28 | "name": "rauchg",
29 | "email": "rauchg@gmail.com"
30 | }
31 | ],
32 | "dist": {
33 | "shasum": "95e75720ff31b72a3ba89a5b6dce082e4bc6467f",
34 | "tarball": "http://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz"
35 | },
36 | "directories": {},
37 | "_resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz",
38 | "readme": "ERROR: No README data found!"
39 | }
40 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/.gitattributes:
--------------------------------------------------------------------------------
1 | # Automatically normalize line endings for all text-based files
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/.npmignore:
--------------------------------------------------------------------------------
1 | # Generated test data file (> 100 MB)
2 | tests/data.json
3 |
4 | # JSON version of coverage report
5 | coverage/coverage.json
6 |
7 | # Installed npm modules
8 | node_modules
9 |
10 | # Folder view configuration files
11 | .DS_Store
12 | Desktop.ini
13 |
14 | # Thumbnail cache files
15 | ._*
16 | Thumbs.db
17 |
18 | # Files that might appear on external disks
19 | .Spotlight-V100
20 | .Trashes
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "0.10"
4 | - "0.8"
5 | before_script:
6 | - "npm install -g grunt-cli"
7 | # Narwhal uses a hardcoded path to openjdk v6, so use that version
8 | - "sudo apt-get update -qq"
9 | - "sudo apt-get install -qq openjdk-6-jre"
10 | - "PACKAGE=rhino1_7R3; wget http://ftp.mozilla.org/pub/mozilla.org/js/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
11 | - "PACKAGE=rhino1_7R3; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
12 | - "PACKAGE=ringojs-0.9; wget http://ringojs.org/downloads/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
13 | - "PACKAGE=ringojs-0.9; sudo ln -s /opt/$PACKAGE/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo"
14 | - "PACKAGE=v0.3.2; wget https://github.com/280north/narwhal/archive/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
15 | - "PACKAGE=narwhal-0.3.2; sudo ln -s /opt/$PACKAGE/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal"
16 | # If the enviroment stores rt.jar in a different directory, find it and symlink the directory
17 | - "PREFIX=/usr/lib/jvm; if [ ! -d $PREFIX/java-6-openjdk ]; then for d in $PREFIX/java-6-openjdk-*; do if [ -e $d/jre/lib/rt.jar ]; then sudo ln -s $d $PREFIX/java-6-openjdk; break; fi; done; fi"
18 | script:
19 | "grunt ci"
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/LICENSE-MIT.txt:
--------------------------------------------------------------------------------
1 | Copyright Mathias Bynens
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "utf8",
3 | "version": "2.0.0",
4 | "main": "utf8.js",
5 | "ignore": [
6 | "coverage",
7 | "tests",
8 | ".*",
9 | "component.json",
10 | "Gruntfile.js",
11 | "node_modules",
12 | "package.json"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "utf8",
3 | "version": "2.0.0",
4 | "description": "A well-tested UTF-8 encoder/decoder written in JavaScript.",
5 | "repo": "mathiasbynens/utf8.js",
6 | "license": "MIT/GPL",
7 | "scripts": [
8 | "utf8.js"
9 | ],
10 | "keywords": [
11 | "charset",
12 | "encoding",
13 | "unicode",
14 | "utf8"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/coverage/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
2 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import re
4 | import json
5 |
6 | # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
7 | # http://stackoverflow.com/a/13436167/96656
8 | def unisymbol(codePoint):
9 | if codePoint >= 0x0000 and codePoint <= 0xFFFF:
10 | return unichr(codePoint)
11 | elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
12 | highSurrogate = int((codePoint - 0x10000) / 0x400) + 0xD800
13 | lowSurrogate = int((codePoint - 0x10000) % 0x400) + 0xDC00
14 | return unichr(highSurrogate) + unichr(lowSurrogate)
15 | else:
16 | return 'Error'
17 |
18 | def hexify(codePoint):
19 | return 'U+' + hex(codePoint)[2:].upper().zfill(6)
20 |
21 | def writeFile(filename, contents):
22 | print filename
23 | with open(filename, 'w') as f:
24 | f.write(contents.strip() + '\n')
25 |
26 | data = []
27 | for codePoint in range(0x000000, 0x10FFFF + 1):
28 | symbol = unisymbol(codePoint)
29 | # http://stackoverflow.com/a/17199950/96656
30 | bytes = symbol.encode('utf8').decode('latin1')
31 | data.append({
32 | 'codePoint': codePoint,
33 | 'decoded': symbol,
34 | 'encoded': bytes
35 | });
36 |
37 | jsonData = json.dumps(data, sort_keys=False, indent=2, separators=(',', ': '))
38 | # Use tabs instead of double spaces for indentation
39 | jsonData = jsonData.replace(' ', '\t')
40 | # Escape hexadecimal digits in escape sequences
41 | jsonData = re.sub(
42 | r'\\u([a-fA-F0-9]{4})',
43 | lambda match: r'\u{}'.format(match.group(1).upper()),
44 | jsonData
45 | )
46 |
47 | writeFile('data.json', jsonData)
48 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | utf8.js test suite
6 |
7 |
8 |
9 |
10 |
11 |
12 |
22 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/x.js:
--------------------------------------------------------------------------------
1 | var utf8 = require('./utf8.js');
2 | var stringEscape = require('string-escape');
3 |
4 | utf8.encode('\xA9');
5 | // console.log(
6 | // utf8.encode('\uD800\uDC01'),
7 | // '\xF0\x90\x80\x81',
8 | // utf8.encode('\uD800\uDC01') == '\xF0\x90\x80\x81'
9 | // );
10 |
11 | var obj = {
12 | 'description': 'Low surrogate followed by another low surrogate',
13 | // 'decoded': '\uDC00\uDC00',
14 | // 'encoded': '\xED\xB0\x80\xED\xB0\x80'
15 | 'decoded': '\xA9',
16 | 'encoded': '\xED\xB0\x80'
17 | };
18 |
19 | // Encoding
20 | actual = utf8.encode(obj.decoded);
21 | expected = obj.encoded;
22 |
23 | if (actual != expected) {
24 | console.log(
25 | 'fail\n',
26 | 'actual ', stringEscape(actual), '\n',
27 | 'expected', stringEscape(expected)
28 | );
29 | } else {
30 | console.log('encoding successsssss')
31 | }
32 |
33 |
34 | // // Decoding
35 | // actual = utf8.decode(obj.encoded);
36 | // expected = obj.decoded;
37 |
38 | // if (actual != expected) {
39 | // console.log(
40 | // 'fail\n',
41 | // 'actual ', actual, '\n',
42 | // 'expected', expected
43 | // );
44 | // } else {
45 | // console.log('decoding successsssss')
46 | // }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.2 / 2013-08-27
3 | ==================
4 |
5 | - explicitly use `global` instead of being implicit
6 | - pin "component/global" to v2.0.1
7 |
8 | 1.0.1 / 2013-08-23
9 | ==================
10 |
11 | - package: add "component" section
12 |
13 | 1.0.0 / 2013-08-22
14 | ==================
15 |
16 | - Initial release
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build --dev
4 |
5 | components: component.json
6 | @component install --dev
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # has-cors
3 |
4 | Detects support for Cross-Origin Resource Sharing
5 |
6 | ## Installation
7 |
8 | Install with [component(1)](http://component.io):
9 |
10 | $ component install component/has-cors
11 |
12 | ## API
13 |
14 | Exports `true` if the user-agent supports CORS, or `false` otherwise.
15 |
16 | ``` js
17 | var hasCORS = require('has-cors');
18 | console.log(hasCORS);
19 | // true
20 | ```
21 |
22 | ## License
23 |
24 | MIT
25 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "has-cors",
3 | "repo": "component/has-cors",
4 | "description": "Detects support for Cross-Origin Resource Sharing",
5 | "version": "1.0.3",
6 | "keywords": [],
7 | "dependencies": {
8 | "component/global": "2.0.1"
9 | },
10 | "development": {},
11 | "license": "MIT",
12 | "main": "index.js",
13 | "scripts": [
14 | "index.js"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var global = require('global');
7 |
8 | /**
9 | * Module exports.
10 | *
11 | * Logic borrowed from Modernizr:
12 | *
13 | * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
14 | */
15 |
16 | try {
17 | module.exports = 'XMLHttpRequest' in global &&
18 | 'withCredentials' in new global.XMLHttpRequest();
19 | } catch (err) {
20 | // if XMLHttp support is disabled in IE then it will throw
21 | // when trying to create
22 | module.exports = false;
23 | }
24 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/.npmignore:
--------------------------------------------------------------------------------
1 | /components
2 | /build
3 | /node_modules
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/History.md:
--------------------------------------------------------------------------------
1 |
2 | 2.0.1 / 2013-08-23
3 | ==================
4 |
5 | - package: add "component" section
6 |
7 | 2.0.0 / 2013-08-22
8 | ==================
9 |
10 | - No more function invocation required, returns `global` directly
11 |
12 | 1.0.0 / 2013-08-22
13 | ==================
14 |
15 | - Initial release
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components
3 | @component build --dev
4 |
5 | components: component.json
6 | @component install --dev
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # global
3 |
4 | Returns a reference to the `global` object
5 |
6 | ## Installation
7 |
8 | Install with [component(1)](http://component.io):
9 |
10 | $ component install component/global
11 |
12 | ## API
13 |
14 | ``` js
15 | var global = require('global');
16 | ```
17 |
18 | ## License
19 |
20 | MIT
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "global",
3 | "repo": "component/global",
4 | "description": "Returns a reference to the `global` object",
5 | "version": "2.0.1",
6 | "keywords": [],
7 | "dependencies": {},
8 | "development": {
9 | "component/assert": "*"
10 | },
11 | "scripts": [
12 | "index.js"
13 | ],
14 | "license": "MIT"
15 | }
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Returns `this`. Execute this without a "context" (i.e. without it being
4 | * attached to an object of the left-hand side), and `this` points to the
5 | * "global" scope of the current JS execution.
6 | */
7 |
8 | module.exports = (function () { return this; })();
9 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "global",
3 | "version": "2.0.1",
4 | "description": "Returns a reference to the `global` object",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "mocha --reporter spec test/test.js"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git://github.com/component/global.git"
12 | },
13 | "keywords": [
14 | "global"
15 | ],
16 | "author": {
17 | "name": "Nathan Rajlich",
18 | "email": "nathan@tootallnate.net",
19 | "url": "http://n8.io/"
20 | },
21 | "license": "MIT",
22 | "devDependencies": {
23 | "mocha": "*"
24 | },
25 | "component": {
26 | "scripts": {
27 | "global/index.js": "index.js"
28 | }
29 | },
30 | "readme": "\n# global\n\n Returns a reference to the `global` object\n\n## Installation\n\n Install with [component(1)](http://component.io):\n\n $ component install component/global\n\n## API\n\n``` js\nvar global = require('global');\n```\n\n## License\n\n MIT\n",
31 | "readmeFilename": "Readme.md",
32 | "bugs": {
33 | "url": "https://github.com/component/global/issues"
34 | },
35 | "homepage": "https://github.com/component/global#readme",
36 | "_id": "global@2.0.1",
37 | "_shasum": "3fb25343fb66d79991b0f4a429ce3b54480eec3c",
38 | "_resolved": "https://github.com/component/global/archive/v2.0.1.tar.gz",
39 | "_from": "https://github.com/component/global/archive/v2.0.1.tar.gz"
40 | }
41 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Mocha
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/node_modules/global/test/test.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var assert = require('assert');
7 | var global;
8 |
9 | try {
10 | // component
11 | global = require('global');
12 | } catch (e) {
13 | // node.js
14 | global = require('../');
15 | }
16 |
17 | describe('global', function () {
18 | it('should return the `global` object', function () {
19 | var str = String(global);
20 | assert('[object global]' == str || '[object Window]' == str);
21 | });
22 | });
23 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/has-cors/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "has-cors",
3 | "version": "1.0.3",
4 | "description": "Detects support for Cross-Origin Resource Sharing",
5 | "main": "index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git://github.com/component/has-cors.git"
9 | },
10 | "dependencies": {
11 | "global": "https://github.com/component/global/archive/v2.0.1.tar.gz"
12 | },
13 | "keywords": [
14 | "cors",
15 | "cross",
16 | "origin",
17 | "resource",
18 | "sharing",
19 | "domain"
20 | ],
21 | "author": {
22 | "name": "Nathan Rajlich",
23 | "email": "nathan@tootallnate.net",
24 | "url": "http://n8.io/"
25 | },
26 | "license": "MIT",
27 | "component": {
28 | "scripts": {
29 | "has-cors/index.js": "index.js"
30 | }
31 | },
32 | "bugs": {
33 | "url": "https://github.com/component/has-cors/issues"
34 | },
35 | "homepage": "https://github.com/component/has-cors",
36 | "_id": "has-cors@1.0.3",
37 | "dist": {
38 | "shasum": "502acb9b3104dac33dd2630eaf2f888b0baf4cb3",
39 | "tarball": "http://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz"
40 | },
41 | "_from": "has-cors@1.0.3",
42 | "_npmVersion": "1.3.24",
43 | "_npmUser": {
44 | "name": "shtylman",
45 | "email": "shtylman@gmail.com"
46 | },
47 | "maintainers": [
48 | {
49 | "name": "shtylman",
50 | "email": "shtylman@gmail.com"
51 | }
52 | ],
53 | "directories": {},
54 | "_shasum": "502acb9b3104dac33dd2630eaf2f888b0baf4cb3",
55 | "_resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.0.3.tgz",
56 | "readme": "ERROR: No README data found!"
57 | }
58 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * JSON parse.
3 | *
4 | * @see Based on jQuery#parseJSON (MIT) and JSON2
5 | * @api private
6 | */
7 |
8 | var rvalidchars = /^[\],:{}\s]*$/;
9 | var rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
10 | var rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
11 | var rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g;
12 | var rtrimLeft = /^\s+/;
13 | var rtrimRight = /\s+$/;
14 |
15 | module.exports = function parsejson(data) {
16 | if ('string' != typeof data || !data) {
17 | return null;
18 | }
19 |
20 | data = data.replace(rtrimLeft, '').replace(rtrimRight, '');
21 |
22 | // Attempt to parse using the native JSON parser first
23 | if (global.JSON && JSON.parse) {
24 | return JSON.parse(data);
25 | }
26 |
27 | if (rvalidchars.test(data.replace(rvalidescape, '@')
28 | .replace(rvalidtokens, ']')
29 | .replace(rvalidbraces, ''))) {
30 | return (new Function('return ' + data))();
31 | }
32 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-02-03
3 | ==================
4 |
5 | * Stop using the removed magic __stack global getter
6 |
7 | 0.1.0 / 2012-10-04
8 | ==================
9 |
10 | * add throwing of AssertionError for test frameworks etc
11 |
12 | 0.0.1 / 2010-01-03
13 | ==================
14 |
15 | * Initial release
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @echo "populate me"
4 |
5 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/example.js:
--------------------------------------------------------------------------------
1 |
2 | var assert = require('./');
3 |
4 | test();
5 |
6 | function test() {
7 | var user = { name: 'tobi' };
8 | assert('tobi' == user.name);
9 | assert('number' == typeof user.age);
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var AssertionError = require('assert').AssertionError
6 | , callsite = require('callsite')
7 | , fs = require('fs')
8 |
9 | /**
10 | * Expose `assert`.
11 | */
12 |
13 | module.exports = process.env.NO_ASSERT
14 | ? function(){}
15 | : assert;
16 |
17 | /**
18 | * Assert the given `expr`.
19 | */
20 |
21 | function assert(expr) {
22 | if (expr) return;
23 |
24 | var stack = callsite();
25 | var call = stack[1];
26 | var file = call.getFileName();
27 | var lineno = call.getLineNumber();
28 | var src = fs.readFileSync(file, 'utf8');
29 | var line = src.split('\n')[lineno-1];
30 | var src = line.match(/assert\((.*)\)/)[1];
31 |
32 | var err = new AssertionError({
33 | message: src,
34 | stackStartFunction: stack[0].getFunction()
35 | });
36 |
37 | throw err;
38 | }
39 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-01-24
3 | ==================
4 |
5 | * remove lame magical getters
6 |
7 | 0.0.1 / 2010-01-03
8 | ==================
9 |
10 | * Initial release
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should
5 |
6 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/Readme.md:
--------------------------------------------------------------------------------
1 | # callstack
2 |
3 | Access to v8's "raw" `CallSite`s.
4 |
5 | ## Installation
6 |
7 | $ npm install callsite
8 |
9 | ## Example
10 |
11 | ```js
12 | var stack = require('callsite');
13 |
14 | foo();
15 |
16 | function foo() {
17 | bar();
18 | }
19 |
20 | function bar() {
21 | baz();
22 | }
23 |
24 | function baz() {
25 | console.log();
26 | stack().forEach(function(site){
27 | console.log(' \033[36m%s\033[90m in %s:%d\033[0m'
28 | , site.getFunctionName() || 'anonymous'
29 | , site.getFileName()
30 | , site.getLineNumber());
31 | });
32 | console.log();
33 | }
34 | ```
35 |
36 | ## Why?
37 |
38 | Because you can do weird, stupid, clever, wacky things such as:
39 |
40 | - [better-assert](https://github.com/visionmedia/better-assert)
41 |
42 | ## License
43 |
44 | MIT
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = function(){
3 | var orig = Error.prepareStackTrace;
4 | Error.prepareStackTrace = function(_, stack){ return stack; };
5 | var err = new Error;
6 | Error.captureStackTrace(err, arguments.callee);
7 | var stack = err.stack;
8 | Error.prepareStackTrace = orig;
9 | return stack;
10 | };
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/node_modules/better-assert/node_modules/callsite/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "callsite",
3 | "version": "1.0.0",
4 | "description": "access to v8's CallSites",
5 | "keywords": [
6 | "stack",
7 | "trace",
8 | "line"
9 | ],
10 | "author": {
11 | "name": "TJ Holowaychuk",
12 | "email": "tj@vision-media.ca"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "mocha": "*",
17 | "should": "*"
18 | },
19 | "main": "index",
20 | "engines": {
21 | "node": "*"
22 | },
23 | "_id": "callsite@1.0.0",
24 | "dist": {
25 | "shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
26 | "tarball": "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz"
27 | },
28 | "_from": "callsite@1.0.0",
29 | "_npmVersion": "1.2.2",
30 | "_npmUser": {
31 | "name": "tjholowaychuk",
32 | "email": "tj@vision-media.ca"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "tjholowaychuk",
37 | "email": "tj@vision-media.ca"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
42 | "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "parsejson",
3 | "version": "0.0.1",
4 | "description": "Method that parses a JSON string and returns a JSON object",
5 | "scripts": {
6 | "test": "make test"
7 | },
8 | "devDependencies": {
9 | "mocha": "1.17.1"
10 | },
11 | "author": "",
12 | "license": "MIT",
13 | "dependencies": {
14 | "better-assert": "~1.0.0"
15 | },
16 | "_id": "parsejson@0.0.1",
17 | "dist": {
18 | "shasum": "9b10c6c0d825ab589e685153826de0a3ba278bcc",
19 | "tarball": "http://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz"
20 | },
21 | "_from": "parsejson@0.0.1",
22 | "_npmVersion": "1.3.15",
23 | "_npmUser": {
24 | "name": "gal",
25 | "email": "koren@mit.edu"
26 | },
27 | "maintainers": [
28 | {
29 | "name": "gal",
30 | "email": "koren@mit.edu"
31 | }
32 | ],
33 | "directories": {},
34 | "_shasum": "9b10c6c0d825ab589e685153826de0a3ba278bcc",
35 | "_resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz",
36 | "readme": "ERROR: No README data found!"
37 | }
38 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parsejson/test.js:
--------------------------------------------------------------------------------
1 | var assert = require('better-assert');
2 | var expect = require('expect.js');
3 | var parsejson = require('./index.js');
4 |
5 | describe('my suite', function(){
6 | it('should parse a JSON string', function () {
7 |
8 | var jsonString = '{"users" :[{"first_name":"foo", "last_name":"bar"}],' +
9 | '"id" :40,' +
10 | '"cities":["los angeles", "new york", "boston"]}';
11 |
12 | var jsonObj = parsejson(jsonString);
13 | expect(jsonObj.users[0].first_name).to.be("foo");
14 | expect(jsonObj.users[0].last_name).to.be("bar");
15 | expect(jsonObj.id).to.be(40);
16 | expect(jsonObj.cities[0]).to.be('los angeles');
17 | expect(jsonObj.cities[1]).to.be('new york');
18 | expect(jsonObj.cities[2]).to.be('boston');
19 |
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Compiles a querystring
3 | * Returns string representation of the object
4 | *
5 | * @param {Object}
6 | * @api private
7 | */
8 |
9 | exports.encode = function (obj) {
10 | var str = '';
11 |
12 | for (var i in obj) {
13 | if (obj.hasOwnProperty(i)) {
14 | if (str.length) str += '&';
15 | str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);
16 | }
17 | }
18 |
19 | return str;
20 | };
21 |
22 | /**
23 | * Parses a simple querystring into an object
24 | *
25 | * @param {String} qs
26 | * @api private
27 | */
28 |
29 | exports.decode = function(qs){
30 | var qry = {};
31 | var pairs = qs.split('&');
32 | for (var i = 0, l = pairs.length; i < l; i++) {
33 | var pair = pairs[i].split('=');
34 | qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
35 | }
36 | return qry;
37 | };
38 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-02-03
3 | ==================
4 |
5 | * Stop using the removed magic __stack global getter
6 |
7 | 0.1.0 / 2012-10-04
8 | ==================
9 |
10 | * add throwing of AssertionError for test frameworks etc
11 |
12 | 0.0.1 / 2010-01-03
13 | ==================
14 |
15 | * Initial release
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @echo "populate me"
4 |
5 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/example.js:
--------------------------------------------------------------------------------
1 |
2 | var assert = require('./');
3 |
4 | test();
5 |
6 | function test() {
7 | var user = { name: 'tobi' };
8 | assert('tobi' == user.name);
9 | assert('number' == typeof user.age);
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var AssertionError = require('assert').AssertionError
6 | , callsite = require('callsite')
7 | , fs = require('fs')
8 |
9 | /**
10 | * Expose `assert`.
11 | */
12 |
13 | module.exports = process.env.NO_ASSERT
14 | ? function(){}
15 | : assert;
16 |
17 | /**
18 | * Assert the given `expr`.
19 | */
20 |
21 | function assert(expr) {
22 | if (expr) return;
23 |
24 | var stack = callsite();
25 | var call = stack[1];
26 | var file = call.getFileName();
27 | var lineno = call.getLineNumber();
28 | var src = fs.readFileSync(file, 'utf8');
29 | var line = src.split('\n')[lineno-1];
30 | var src = line.match(/assert\((.*)\)/)[1];
31 |
32 | var err = new AssertionError({
33 | message: src,
34 | stackStartFunction: stack[0].getFunction()
35 | });
36 |
37 | throw err;
38 | }
39 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-01-24
3 | ==================
4 |
5 | * remove lame magical getters
6 |
7 | 0.0.1 / 2010-01-03
8 | ==================
9 |
10 | * Initial release
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should
5 |
6 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/Readme.md:
--------------------------------------------------------------------------------
1 | # callstack
2 |
3 | Access to v8's "raw" `CallSite`s.
4 |
5 | ## Installation
6 |
7 | $ npm install callsite
8 |
9 | ## Example
10 |
11 | ```js
12 | var stack = require('callsite');
13 |
14 | foo();
15 |
16 | function foo() {
17 | bar();
18 | }
19 |
20 | function bar() {
21 | baz();
22 | }
23 |
24 | function baz() {
25 | console.log();
26 | stack().forEach(function(site){
27 | console.log(' \033[36m%s\033[90m in %s:%d\033[0m'
28 | , site.getFunctionName() || 'anonymous'
29 | , site.getFileName()
30 | , site.getLineNumber());
31 | });
32 | console.log();
33 | }
34 | ```
35 |
36 | ## Why?
37 |
38 | Because you can do weird, stupid, clever, wacky things such as:
39 |
40 | - [better-assert](https://github.com/visionmedia/better-assert)
41 |
42 | ## License
43 |
44 | MIT
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = function(){
3 | var orig = Error.prepareStackTrace;
4 | Error.prepareStackTrace = function(_, stack){ return stack; };
5 | var err = new Error;
6 | Error.captureStackTrace(err, arguments.callee);
7 | var stack = err.stack;
8 | Error.prepareStackTrace = orig;
9 | return stack;
10 | };
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/node_modules/better-assert/node_modules/callsite/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "callsite",
3 | "version": "1.0.0",
4 | "description": "access to v8's CallSites",
5 | "keywords": [
6 | "stack",
7 | "trace",
8 | "line"
9 | ],
10 | "author": {
11 | "name": "TJ Holowaychuk",
12 | "email": "tj@vision-media.ca"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "mocha": "*",
17 | "should": "*"
18 | },
19 | "main": "index",
20 | "engines": {
21 | "node": "*"
22 | },
23 | "_id": "callsite@1.0.0",
24 | "dist": {
25 | "shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
26 | "tarball": "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz"
27 | },
28 | "_from": "callsite@1.0.0",
29 | "_npmVersion": "1.2.2",
30 | "_npmUser": {
31 | "name": "tjholowaychuk",
32 | "email": "tj@vision-media.ca"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "tjholowaychuk",
37 | "email": "tj@vision-media.ca"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
42 | "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "parseqs",
3 | "version": "0.0.2",
4 | "description": "Provides methods for parsing a query string into an object, and vice versa.",
5 | "scripts": {
6 | "test": "make test"
7 | },
8 | "devDependencies": {
9 | "mocha": "1.17.1"
10 | },
11 | "author": "",
12 | "license": "MIT",
13 | "dependencies": {
14 | "better-assert": "~1.0.0"
15 | },
16 | "_id": "parseqs@0.0.2",
17 | "dist": {
18 | "shasum": "9dfe70b2cddac388bde4f35b1f240fa58adbe6c7",
19 | "tarball": "http://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz"
20 | },
21 | "_from": "parseqs@0.0.2",
22 | "_npmVersion": "1.3.15",
23 | "_npmUser": {
24 | "name": "gal",
25 | "email": "koren@mit.edu"
26 | },
27 | "maintainers": [
28 | {
29 | "name": "gal",
30 | "email": "koren@mit.edu"
31 | }
32 | ],
33 | "directories": {},
34 | "_shasum": "9dfe70b2cddac388bde4f35b1f240fa58adbe6c7",
35 | "_resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz",
36 | "readme": "ERROR: No README data found!"
37 | }
38 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseqs/test.js:
--------------------------------------------------------------------------------
1 | var assert = require('better-assert');
2 | var expect = require('expect.js');
3 | var util = require('./index.js');
4 |
5 | describe('querystring test suite', function(){
6 | it('should parse a querystring and return an object', function () {
7 |
8 | // Single assignment
9 | var queryObj = util.decode("foo=bar");
10 | expect(queryObj.foo).to.be("bar");
11 |
12 | // Multiple assignments
13 | queryObj = util.decode("france=paris&germany=berlin");
14 | expect(queryObj.france).to.be("paris");
15 | expect(queryObj.germany).to.be("berlin");
16 |
17 | // Assignments containing non-alphanumeric characters
18 | queryObj = util.decode("india=new%20delhi");
19 | expect(queryObj.india).to.be("new delhi");
20 | });
21 |
22 | it('should construct a query string from an object', function () {
23 | expect(util.encode({ a: 'b' })).to.be('a=b');
24 | expect(util.encode({ a: 'b', c: 'd' })).to.be('a=b&c=d');
25 | expect(util.encode({ a: 'b', c: 'tobi rocks' })).to.be('a=b&c=tobi%20rocks');
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/History.md:
--------------------------------------------------------------------------------
1 |
2 | n.n.n / 2014-02-09
3 | ==================
4 |
5 | * parseuri first commit
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Parses an URI
3 | *
4 | * @author Steven Levithan (MIT license)
5 | * @api private
6 | */
7 |
8 | var re = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
9 |
10 | var parts = [
11 | 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'
12 | ];
13 |
14 | module.exports = function parseuri(str) {
15 | var src = str,
16 | b = str.indexOf('['),
17 | e = str.indexOf(']');
18 |
19 | if (b != -1 && e != -1) {
20 | str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);
21 | }
22 |
23 | var m = re.exec(str || ''),
24 | uri = {},
25 | i = 14;
26 |
27 | while (i--) {
28 | uri[parts[i]] = m[i] || '';
29 | }
30 |
31 | if (b != -1 && e != -1) {
32 | uri.source = src;
33 | uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');
34 | uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');
35 | uri.ipv6uri = true;
36 | }
37 |
38 | return uri;
39 | };
40 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-02-03
3 | ==================
4 |
5 | * Stop using the removed magic __stack global getter
6 |
7 | 0.1.0 / 2012-10-04
8 | ==================
9 |
10 | * add throwing of AssertionError for test frameworks etc
11 |
12 | 0.0.1 / 2010-01-03
13 | ==================
14 |
15 | * Initial release
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @echo "populate me"
4 |
5 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/example.js:
--------------------------------------------------------------------------------
1 |
2 | var assert = require('./');
3 |
4 | test();
5 |
6 | function test() {
7 | var user = { name: 'tobi' };
8 | assert('tobi' == user.name);
9 | assert('number' == typeof user.age);
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var AssertionError = require('assert').AssertionError
6 | , callsite = require('callsite')
7 | , fs = require('fs')
8 |
9 | /**
10 | * Expose `assert`.
11 | */
12 |
13 | module.exports = process.env.NO_ASSERT
14 | ? function(){}
15 | : assert;
16 |
17 | /**
18 | * Assert the given `expr`.
19 | */
20 |
21 | function assert(expr) {
22 | if (expr) return;
23 |
24 | var stack = callsite();
25 | var call = stack[1];
26 | var file = call.getFileName();
27 | var lineno = call.getLineNumber();
28 | var src = fs.readFileSync(file, 'utf8');
29 | var line = src.split('\n')[lineno-1];
30 | var src = line.match(/assert\((.*)\)/)[1];
31 |
32 | var err = new AssertionError({
33 | message: src,
34 | stackStartFunction: stack[0].getFunction()
35 | });
36 |
37 | throw err;
38 | }
39 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-01-24
3 | ==================
4 |
5 | * remove lame magical getters
6 |
7 | 0.0.1 / 2010-01-03
8 | ==================
9 |
10 | * Initial release
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should
5 |
6 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/Readme.md:
--------------------------------------------------------------------------------
1 | # callstack
2 |
3 | Access to v8's "raw" `CallSite`s.
4 |
5 | ## Installation
6 |
7 | $ npm install callsite
8 |
9 | ## Example
10 |
11 | ```js
12 | var stack = require('callsite');
13 |
14 | foo();
15 |
16 | function foo() {
17 | bar();
18 | }
19 |
20 | function bar() {
21 | baz();
22 | }
23 |
24 | function baz() {
25 | console.log();
26 | stack().forEach(function(site){
27 | console.log(' \033[36m%s\033[90m in %s:%d\033[0m'
28 | , site.getFunctionName() || 'anonymous'
29 | , site.getFileName()
30 | , site.getLineNumber());
31 | });
32 | console.log();
33 | }
34 | ```
35 |
36 | ## Why?
37 |
38 | Because you can do weird, stupid, clever, wacky things such as:
39 |
40 | - [better-assert](https://github.com/visionmedia/better-assert)
41 |
42 | ## License
43 |
44 | MIT
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = function(){
3 | var orig = Error.prepareStackTrace;
4 | Error.prepareStackTrace = function(_, stack){ return stack; };
5 | var err = new Error;
6 | Error.captureStackTrace(err, arguments.callee);
7 | var stack = err.stack;
8 | Error.prepareStackTrace = orig;
9 | return stack;
10 | };
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "callsite",
3 | "version": "1.0.0",
4 | "description": "access to v8's CallSites",
5 | "keywords": [
6 | "stack",
7 | "trace",
8 | "line"
9 | ],
10 | "author": {
11 | "name": "TJ Holowaychuk",
12 | "email": "tj@vision-media.ca"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "mocha": "*",
17 | "should": "*"
18 | },
19 | "main": "index",
20 | "engines": {
21 | "node": "*"
22 | },
23 | "_id": "callsite@1.0.0",
24 | "dist": {
25 | "shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
26 | "tarball": "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz"
27 | },
28 | "_from": "callsite@1.0.0",
29 | "_npmVersion": "1.2.2",
30 | "_npmUser": {
31 | "name": "tjholowaychuk",
32 | "email": "tj@vision-media.ca"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "tjholowaychuk",
37 | "email": "tj@vision-media.ca"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
42 | "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/parseuri/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "parseuri",
3 | "version": "0.0.4",
4 | "description": "Method that parses a URI and returns an array of its components",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/get/parseuri.git"
8 | },
9 | "homepage": "https://github.com/get/parseuri",
10 | "scripts": {
11 | "test": "make test"
12 | },
13 | "devDependencies": {
14 | "mocha": "1.17.1"
15 | },
16 | "author": "",
17 | "license": "MIT",
18 | "dependencies": {
19 | "better-assert": "~1.0.0"
20 | },
21 | "bugs": {
22 | "url": "https://github.com/get/parseuri/issues"
23 | },
24 | "_id": "parseuri@0.0.4",
25 | "dist": {
26 | "shasum": "806582a39887e1ea18dd5e2fe0e01902268e9350",
27 | "tarball": "http://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz"
28 | },
29 | "_from": "parseuri@0.0.4",
30 | "_npmVersion": "1.3.15",
31 | "_npmUser": {
32 | "name": "gal",
33 | "email": "koren@mit.edu"
34 | },
35 | "maintainers": [
36 | {
37 | "name": "gal",
38 | "email": "koren@mit.edu"
39 | }
40 | ],
41 | "directories": {},
42 | "_shasum": "806582a39887e1ea18dd5e2fe0e01902268e9350",
43 | "_resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz",
44 | "readme": "ERROR: No README data found!"
45 | }
46 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/.npmignore:
--------------------------------------------------------------------------------
1 | npm-debug.log
2 | node_modules
3 | .*.swp
4 | .lock-*
5 | build
6 |
7 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | npm_args: --ws:native
3 | node_js:
4 | - "0.6"
5 | - "0.8"
6 | - "0.10"
7 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/Makefile:
--------------------------------------------------------------------------------
1 | ALL_TESTS = $(shell find test/ -name '*.test.js')
2 | ALL_INTEGRATION = $(shell find test/ -name '*.integration.js')
3 |
4 | all:
5 | node-gyp configure build
6 |
7 | clean:
8 | node-gyp clean
9 |
10 | run-tests:
11 | @./node_modules/.bin/mocha \
12 | -t 2000 \
13 | -s 2400 \
14 | $(TESTFLAGS) \
15 | $(TESTS)
16 |
17 | run-integrationtests:
18 | @./node_modules/.bin/mocha \
19 | -t 5000 \
20 | -s 6000 \
21 | $(TESTFLAGS) \
22 | $(TESTS)
23 |
24 | test:
25 | @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
26 |
27 | integrationtest:
28 | @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_INTEGRATION)" run-integrationtests
29 |
30 | benchmark:
31 | @node bench/sender.benchmark.js
32 | @node bench/parser.benchmark.js
33 |
34 | autobahn:
35 | @NODE_PATH=lib node test/autobahn.js
36 |
37 | autobahn-server:
38 | @NODE_PATH=lib node test/autobahn-server.js
39 |
40 | .PHONY: test
41 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/bench/sender.benchmark.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | /**
8 | * Benchmark dependencies.
9 | */
10 |
11 | var benchmark = require('benchmark')
12 | , Sender = require('../').Sender
13 | , suite = new benchmark.Suite('Sender');
14 | require('tinycolor');
15 | require('./util');
16 |
17 | /**
18 | * Setup sender.
19 | */
20 |
21 | suite.on('start', function () {
22 | sender = new Sender();
23 | sender._socket = { write: function() {} };
24 | });
25 |
26 | suite.on('cycle', function () {
27 | sender = new Sender();
28 | sender._socket = { write: function() {} };
29 | });
30 |
31 | /**
32 | * Benchmarks
33 | */
34 |
35 | framePacket = new Buffer(200*1024);
36 | framePacket.fill(99);
37 | suite.add('frameAndSend, unmasked (200 kB)', function () {
38 | sender.frameAndSend(0x2, framePacket, true, false);
39 | });
40 | suite.add('frameAndSend, masked (200 kB)', function () {
41 | sender.frameAndSend(0x2, framePacket, true, true);
42 | });
43 |
44 | /**
45 | * Output progress.
46 | */
47 |
48 | suite.on('cycle', function (bench, details) {
49 | console.log('\n ' + suite.name.grey, details.name.white.bold);
50 | console.log(' ' + [
51 | details.hz.toFixed(2).cyan + ' ops/sec'.grey
52 | , details.count.toString().white + ' times executed'.grey
53 | , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey
54 | ,
55 | ].join(', '.grey));
56 | });
57 |
58 | /**
59 | * Run/export benchmarks.
60 | */
61 |
62 | if (!module.parent) {
63 | suite.run();
64 | } else {
65 | module.exports = suite;
66 | }
67 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/binding.gyp:
--------------------------------------------------------------------------------
1 | {
2 | 'targets': [
3 | {
4 | 'target_name': 'validation',
5 | 'include_dirs': ["
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 | This example will upload an entire directory tree to the node.js server via a fast and persistent WebSocket connection.
17 | Note that the example is Chrome only for now.
18 |
19 | Upload status:
20 | Please select a directory to upload.
21 |
22 |
23 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats-express_3/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "",
3 | "name": "serverstats",
4 | "version": "0.0.0",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/einaros/ws.git"
8 | },
9 | "engines": {
10 | "node": ">0.4.0"
11 | },
12 | "dependencies": {
13 | "express": "~3.0.0"
14 | },
15 | "devDependencies": {},
16 | "optionalDependencies": {}
17 | }
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
26 |
27 |
28 | Server Stats
29 | RSS:
30 | Heap total:
31 | Heap used:
32 |
33 |
34 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats-express_3/server.js:
--------------------------------------------------------------------------------
1 | var WebSocketServer = require('../../').Server
2 | , http = require('http')
3 | , express = require('express')
4 | , app = express();
5 |
6 | app.use(express.static(__dirname + '/public'));
7 |
8 | var server = http.createServer(app);
9 | server.listen(8080);
10 |
11 | var wss = new WebSocketServer({server: server});
12 | wss.on('connection', function(ws) {
13 | var id = setInterval(function() {
14 | ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ });
15 | }, 100);
16 | console.log('started client interval');
17 | ws.on('close', function() {
18 | console.log('stopping client interval');
19 | clearInterval(id);
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "",
3 | "name": "serverstats",
4 | "version": "0.0.0",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/einaros/ws.git"
8 | },
9 | "engines": {
10 | "node": ">0.4.0"
11 | },
12 | "dependencies": {
13 | "express": "2.x"
14 | },
15 | "devDependencies": {},
16 | "optionalDependencies": {}
17 | }
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
26 |
27 |
28 | Server Stats
29 | RSS:
30 | Heap total:
31 | Heap used:
32 |
33 |
34 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/serverstats/server.js:
--------------------------------------------------------------------------------
1 | var WebSocketServer = require('../../').Server
2 | , http = require('http')
3 | , express = require('express')
4 | , app = express.createServer();
5 |
6 | app.use(express.static(__dirname + '/public'));
7 | app.listen(8080);
8 |
9 | var wss = new WebSocketServer({server: app});
10 | wss.on('connection', function(ws) {
11 | var id = setInterval(function() {
12 | ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ });
13 | }, 100);
14 | console.log('started client interval');
15 | ws.on('close', function() {
16 | console.log('stopping client interval');
17 | clearInterval(id);
18 | })
19 | });
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/examples/ssl.js:
--------------------------------------------------------------------------------
1 |
2 | (function(){
3 |
4 | "use strict";
5 |
6 | var fs = require('fs');
7 |
8 | // you'll probably load configuration from config
9 | var cfg = {
10 | ssl: true,
11 | port: 8080,
12 | ssl_key: '/path/to/you/ssl.key',
13 | ssl_cert: '/path/to/you/ssl.crt'
14 | };
15 |
16 | var httpServ = ( cfg.ssl ) ? require('https') : require('http');
17 |
18 | var WebSocketServer = require('../').Server;
19 |
20 | var app = null;
21 |
22 | // dummy request processing
23 | var processRequest = function( req, res ) {
24 |
25 | res.writeHead(200);
26 | res.end("All glory to WebSockets!\n");
27 | };
28 |
29 | if ( cfg.ssl ) {
30 |
31 | app = httpServ.createServer({
32 |
33 | // providing server with SSL key/cert
34 | key: fs.readFileSync( cfg.ssl_key ),
35 | cert: fs.readFileSync( cfg.ssl_cert )
36 |
37 | }, processRequest ).listen( cfg.port );
38 |
39 | } else {
40 |
41 | app = httpServ.createServer( processRequest ).listen( cfg.port );
42 | }
43 |
44 | // passing or reference to web server so WS would knew port and SSL capabilities
45 | var wss = new WebSocketServer( { server: app } );
46 |
47 |
48 | wss.on( 'connection', function ( wsConnect ) {
49 |
50 | wsConnect.on( 'message', function ( message ) {
51 |
52 | console.log( message );
53 |
54 | });
55 |
56 | });
57 |
58 |
59 | }());
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/index.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | module.exports = require('./lib/WebSocket');
8 | module.exports.Server = require('./lib/WebSocketServer');
9 | module.exports.Sender = require('./lib/Sender');
10 | module.exports.Receiver = require('./lib/Receiver');
11 |
12 | module.exports.createServer = function (options, connectionListener) {
13 | var server = new module.exports.Server(options);
14 | if (typeof connectionListener === 'function') {
15 | server.on('connection', connectionListener);
16 | }
17 | return server;
18 | };
19 |
20 | module.exports.connect = module.exports.createConnection = function (address, openListener) {
21 | var client = new module.exports(address);
22 | if (typeof openListener === 'function') {
23 | client.on('open', openListener);
24 | }
25 | return client;
26 | };
27 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/BufferUtil.fallback.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | module.exports.BufferUtil = {
8 | merge: function(mergedBuffer, buffers) {
9 | var offset = 0;
10 | for (var i = 0, l = buffers.length; i < l; ++i) {
11 | var buf = buffers[i];
12 | buf.copy(mergedBuffer, offset);
13 | offset += buf.length;
14 | }
15 | },
16 | mask: function(source, mask, output, offset, length) {
17 | var maskNum = mask.readUInt32LE(0, true);
18 | var i = 0;
19 | for (; i < length - 3; i += 4) {
20 | var num = maskNum ^ source.readUInt32LE(i, true);
21 | if (num < 0) num = 4294967296 + num;
22 | output.writeUInt32LE(num, offset + i, true);
23 | }
24 | switch (length % 4) {
25 | case 3: output[offset + i + 2] = source[i + 2] ^ mask[2];
26 | case 2: output[offset + i + 1] = source[i + 1] ^ mask[1];
27 | case 1: output[offset + i] = source[i] ^ mask[0];
28 | case 0:;
29 | }
30 | },
31 | unmask: function(data, mask) {
32 | var maskNum = mask.readUInt32LE(0, true);
33 | var length = data.length;
34 | var i = 0;
35 | for (; i < length - 3; i += 4) {
36 | var num = maskNum ^ data.readUInt32LE(i, true);
37 | if (num < 0) num = 4294967296 + num;
38 | data.writeUInt32LE(num, i, true);
39 | }
40 | switch (length % 4) {
41 | case 3: data[i + 2] = data[i + 2] ^ mask[2];
42 | case 2: data[i + 1] = data[i + 1] ^ mask[1];
43 | case 1: data[i] = data[i] ^ mask[0];
44 | case 0:;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/BufferUtil.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | try {
8 | module.exports = require('../build/Release/bufferutil');
9 | } catch (e) { try {
10 | module.exports = require('../build/default/bufferutil');
11 | } catch (e) { try {
12 | module.exports = require('./BufferUtil.fallback');
13 | } catch (e) {
14 | console.error('bufferutil.node seems to not have been built. Run npm install.');
15 | throw e;
16 | }}}
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/ErrorCodes.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | module.exports = {
8 | isValidErrorCode: function(code) {
9 | return (code >= 1000 && code <= 1011 && code != 1004 && code != 1005 && code != 1006) ||
10 | (code >= 3000 && code <= 4999);
11 | },
12 | 1000: 'normal',
13 | 1001: 'going away',
14 | 1002: 'protocol error',
15 | 1003: 'unsupported data',
16 | 1004: 'reserved',
17 | 1005: 'reserved for extensions',
18 | 1006: 'reserved for extensions',
19 | 1007: 'inconsistent or invalid data',
20 | 1008: 'policy violation',
21 | 1009: 'message too big',
22 | 1010: 'extension handshake missing',
23 | 1011: 'an unexpected condition prevented the request from being fulfilled',
24 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/Validation.fallback.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | module.exports.Validation = {
8 | isValidUTF8: function(buffer) {
9 | return true;
10 | }
11 | };
12 |
13 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/Validation.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * ws: a node.js websocket client
3 | * Copyright(c) 2011 Einar Otto Stangvik
4 | * MIT Licensed
5 | */
6 |
7 | try {
8 | module.exports = require('../build/Release/validation');
9 | } catch (e) { try {
10 | module.exports = require('../build/default/validation');
11 | } catch (e) { try {
12 | module.exports = require('./Validation.fallback');
13 | } catch (e) {
14 | console.error('validation.node seems to not have been built. Run npm install.');
15 | throw e;
16 | }}}
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib/browser.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var global = (function() { return this; })();
7 |
8 | /**
9 | * WebSocket constructor.
10 | */
11 |
12 | var WebSocket = global.WebSocket || global.MozWebSocket;
13 |
14 | /**
15 | * Module exports.
16 | */
17 |
18 | module.exports = WebSocket ? ws : null;
19 |
20 | /**
21 | * WebSocket constructor.
22 | *
23 | * The third `opts` options object gets ignored in web browsers, since it's
24 | * non-standard, and throws a TypeError if passed to the constructor.
25 | * See: https://github.com/einaros/ws/issues/227
26 | *
27 | * @param {String} uri
28 | * @param {Array} protocols (optional)
29 | * @param {Object) opts (optional)
30 | * @api public
31 | */
32 |
33 | function ws(uri, protocols, opts) {
34 | var instance;
35 | if (protocols) {
36 | instance = new WebSocket(uri, protocols);
37 | } else {
38 | instance = new WebSocket(uri);
39 | }
40 | return instance;
41 | }
42 |
43 | if (WebSocket) ws.prototype = WebSocket.prototype;
44 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/commander/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/commander/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.4
4 | - 0.6
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/commander/Makefile:
--------------------------------------------------------------------------------
1 |
2 | TESTS = $(shell find test/test.*.js)
3 |
4 | test:
5 | @./test/run $(TESTS)
6 |
7 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/commander/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./lib/commander');
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/commander/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "commander",
3 | "version": "0.6.1",
4 | "description": "the complete solution for node.js command-line programs",
5 | "keywords": [
6 | "command",
7 | "option",
8 | "parser",
9 | "prompt",
10 | "stdin"
11 | ],
12 | "author": {
13 | "name": "TJ Holowaychuk",
14 | "email": "tj@vision-media.ca"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "git://github.com/visionmedia/commander.js.git"
19 | },
20 | "dependencies": {},
21 | "devDependencies": {
22 | "should": ">= 0.0.1"
23 | },
24 | "scripts": {
25 | "test": "make test"
26 | },
27 | "main": "index",
28 | "engines": {
29 | "node": ">= 0.4.x"
30 | },
31 | "_npmUser": {
32 | "name": "tjholowaychuk",
33 | "email": "tj@vision-media.ca"
34 | },
35 | "_id": "commander@0.6.1",
36 | "optionalDependencies": {},
37 | "_engineSupported": true,
38 | "_npmVersion": "1.1.0-3",
39 | "_nodeVersion": "v0.6.12",
40 | "_defaultsLoaded": true,
41 | "dist": {
42 | "shasum": "fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06",
43 | "tarball": "http://registry.npmjs.org/commander/-/commander-0.6.1.tgz"
44 | },
45 | "maintainers": [
46 | {
47 | "name": "tjholowaychuk",
48 | "email": "tj@vision-media.ca"
49 | }
50 | ],
51 | "directories": {},
52 | "_shasum": "fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06",
53 | "_resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
54 | "_from": "commander@>=0.6.1 <0.7.0",
55 | "bugs": {
56 | "url": "https://github.com/visionmedia/commander.js/issues"
57 | },
58 | "readme": "ERROR: No README data found!",
59 | "homepage": "https://github.com/visionmedia/commander.js#readme"
60 | }
61 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/nan/.index.js:
--------------------------------------------------------------------------------
1 | //noop
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/nan/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nan",
3 | "version": "0.3.2",
4 | "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility",
5 | "main": ".index.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git://github.com/rvagg/nan.git"
9 | },
10 | "contributors": [
11 | {
12 | "name": "Rod Vagg",
13 | "email": "r@va.gg",
14 | "url": "https://github.com/rvagg"
15 | },
16 | {
17 | "name": "Benjamin Byholm",
18 | "email": "bbyholm@abo.fi",
19 | "url": "https://github.com/kkoopa/"
20 | },
21 | {
22 | "name": "Trevor Norris",
23 | "email": "trev.norris@gmail.com",
24 | "url": "https://github.com/trevnorris"
25 | }
26 | ],
27 | "license": "MIT",
28 | "bugs": {
29 | "url": "https://github.com/rvagg/nan/issues"
30 | },
31 | "_id": "nan@0.3.2",
32 | "dist": {
33 | "shasum": "0df1935cab15369075ef160ad2894107aa14dc2d",
34 | "tarball": "http://registry.npmjs.org/nan/-/nan-0.3.2.tgz"
35 | },
36 | "_from": "nan@>=0.3.0 <0.4.0",
37 | "_npmVersion": "1.3.8",
38 | "_npmUser": {
39 | "name": "rvagg",
40 | "email": "rod@vagg.org"
41 | },
42 | "maintainers": [
43 | {
44 | "name": "rvagg",
45 | "email": "rod@vagg.org"
46 | }
47 | ],
48 | "directories": {},
49 | "_shasum": "0df1935cab15369075ef160ad2894107aa14dc2d",
50 | "_resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz",
51 | "readme": "ERROR: No README data found!",
52 | "homepage": "https://github.com/rvagg/nan#readme"
53 | }
54 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/options/.npmignore:
--------------------------------------------------------------------------------
1 | npm-debug.log
2 | node_modules
3 | .*.swp
4 | .lock-*
5 | build/
6 |
7 | test
8 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/options/Makefile:
--------------------------------------------------------------------------------
1 | ALL_TESTS = $(shell find test/ -name '*.test.js')
2 |
3 | run-tests:
4 | @./node_modules/.bin/mocha \
5 | -t 2000 \
6 | $(TESTFLAGS) \
7 | $(TESTS)
8 |
9 | test:
10 | @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
11 |
12 | .PHONY: test
13 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/options/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": {
3 | "name": "Einar Otto Stangvik",
4 | "email": "einaros@gmail.com",
5 | "url": "http://2x.io"
6 | },
7 | "name": "options",
8 | "description": "A very light-weight in-code option parsers for node.js.",
9 | "version": "0.0.6",
10 | "repository": {
11 | "type": "git",
12 | "url": "git://github.com/einaros/options.js.git"
13 | },
14 | "main": "lib/options",
15 | "scripts": {
16 | "test": "make test"
17 | },
18 | "engines": {
19 | "node": ">=0.4.0"
20 | },
21 | "dependencies": {},
22 | "devDependencies": {
23 | "mocha": "latest"
24 | },
25 | "gitHead": "ff53d0a092c897cb95964232a96fe17da65c11af",
26 | "bugs": {
27 | "url": "https://github.com/einaros/options.js/issues"
28 | },
29 | "homepage": "https://github.com/einaros/options.js",
30 | "_id": "options@0.0.6",
31 | "_shasum": "ec22d312806bb53e731773e7cdaefcf1c643128f",
32 | "_from": "options@>=0.0.5",
33 | "_npmVersion": "1.4.21",
34 | "_npmUser": {
35 | "name": "einaros",
36 | "email": "einaros@gmail.com"
37 | },
38 | "maintainers": [
39 | {
40 | "name": "einaros",
41 | "email": "einaros@gmail.com"
42 | }
43 | ],
44 | "dist": {
45 | "shasum": "ec22d312806bb53e731773e7cdaefcf1c643128f",
46 | "tarball": "http://registry.npmjs.org/options/-/options-0.0.6.tgz"
47 | },
48 | "directories": {},
49 | "_resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz",
50 | "readme": "ERROR: No README data found!"
51 | }
52 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/tinycolor/.npmignore:
--------------------------------------------------------------------------------
1 | npm-debug.log
2 | node_modules
3 | .*.swp
4 | .lock-*
5 | build/
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/tinycolor/README.md:
--------------------------------------------------------------------------------
1 | # tinycolor #
2 |
3 | This is a no-fuzz, barebone, zero muppetry color module for node.js.
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/tinycolor/example.js:
--------------------------------------------------------------------------------
1 | require('./tinycolor');
2 | console.log('this should be red and have an underline!'.grey.underline);
3 | console.log('this should have a blue background!'.bgBlue);
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/tinycolor/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": {
3 | "name": "Einar Otto Stangvik",
4 | "email": "einaros@gmail.com",
5 | "url": "http://2x.io"
6 | },
7 | "name": "tinycolor",
8 | "description": "a to-the-point color module for node",
9 | "version": "0.0.1",
10 | "repository": {
11 | "type": "git",
12 | "url": "git://github.com/einaros/tinycolor.git"
13 | },
14 | "engines": {
15 | "node": ">=0.4.0"
16 | },
17 | "dependencies": {},
18 | "devDependencies": {},
19 | "main": "tinycolor",
20 | "_npmUser": {
21 | "name": "einaros",
22 | "email": "einaros@gmail.com"
23 | },
24 | "_id": "tinycolor@0.0.1",
25 | "_engineSupported": true,
26 | "_npmVersion": "1.1.0-alpha-6",
27 | "_nodeVersion": "v0.6.5",
28 | "_defaultsLoaded": true,
29 | "dist": {
30 | "shasum": "320b5a52d83abb5978d81a3e887d4aefb15a6164",
31 | "tarball": "http://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz"
32 | },
33 | "maintainers": [
34 | {
35 | "name": "einaros",
36 | "email": "einaros@gmail.com"
37 | }
38 | ],
39 | "directories": {},
40 | "_shasum": "320b5a52d83abb5978d81a3e887d4aefb15a6164",
41 | "_resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz",
42 | "_from": "tinycolor@>=0.0.0 <1.0.0",
43 | "bugs": {
44 | "url": "https://github.com/einaros/tinycolor/issues"
45 | },
46 | "readme": "ERROR: No README data found!",
47 | "homepage": "https://github.com/einaros/tinycolor#readme"
48 | }
49 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js:
--------------------------------------------------------------------------------
1 | var styles = {
2 | 'bold': ['\033[1m', '\033[22m'],
3 | 'italic': ['\033[3m', '\033[23m'],
4 | 'underline': ['\033[4m', '\033[24m'],
5 | 'inverse': ['\033[7m', '\033[27m'],
6 | 'black': ['\033[30m', '\033[39m'],
7 | 'red': ['\033[31m', '\033[39m'],
8 | 'green': ['\033[32m', '\033[39m'],
9 | 'yellow': ['\033[33m', '\033[39m'],
10 | 'blue': ['\033[34m', '\033[39m'],
11 | 'magenta': ['\033[35m', '\033[39m'],
12 | 'cyan': ['\033[36m', '\033[39m'],
13 | 'white': ['\033[37m', '\033[39m'],
14 | 'default': ['\033[39m', '\033[39m'],
15 | 'grey': ['\033[90m', '\033[39m'],
16 | 'bgBlack': ['\033[40m', '\033[49m'],
17 | 'bgRed': ['\033[41m', '\033[49m'],
18 | 'bgGreen': ['\033[42m', '\033[49m'],
19 | 'bgYellow': ['\033[43m', '\033[49m'],
20 | 'bgBlue': ['\033[44m', '\033[49m'],
21 | 'bgMagenta': ['\033[45m', '\033[49m'],
22 | 'bgCyan': ['\033[46m', '\033[49m'],
23 | 'bgWhite': ['\033[47m', '\033[49m'],
24 | 'bgDefault': ['\033[49m', '\033[49m']
25 | }
26 | Object.keys(styles).forEach(function(style) {
27 | Object.defineProperty(String.prototype, style, {
28 | get: function() { return styles[style][0] + this + styles[style][1]; },
29 | enumerable: false
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/Sender.test.js:
--------------------------------------------------------------------------------
1 | var Sender = require('../lib/Sender');
2 | require('should');
3 |
4 | describe('Sender', function() {
5 | describe('#frameAndSend', function() {
6 | it('does not modify a masked binary buffer', function() {
7 | var sender = new Sender({ write: function() {} });
8 | var buf = new Buffer([1, 2, 3, 4, 5]);
9 | sender.frameAndSend(2, buf, true, true);
10 | buf[0].should.eql(1);
11 | buf[1].should.eql(2);
12 | buf[2].should.eql(3);
13 | buf[3].should.eql(4);
14 | buf[4].should.eql(5);
15 | });
16 |
17 | it('does not modify a masked text buffer', function() {
18 | var sender = new Sender({ write: function() {} });
19 | var text = 'hi there';
20 | sender.frameAndSend(1, text, true, true);
21 | text.should.eql('hi there');
22 | });
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/WebSocket.integration.js:
--------------------------------------------------------------------------------
1 | var assert = require('assert')
2 | , WebSocket = require('../')
3 | , server = require('./testserver');
4 |
5 | var port = 20000;
6 |
7 | function getArrayBuffer(buf) {
8 | var l = buf.length;
9 | var arrayBuf = new ArrayBuffer(l);
10 | var uint8View = new Uint8Array(arrayBuf);
11 |
12 | for (var i = 0; i < l; i++) {
13 | uint8View[i] = buf[i];
14 | }
15 | return uint8View.buffer;
16 | }
17 |
18 | function areArraysEqual(x, y) {
19 | if (x.length != y.length) return false;
20 | for (var i = 0, l = x.length; i < l; ++i) {
21 | if (x[i] !== y[i]) return false;
22 | }
23 | return true;
24 | }
25 |
26 | describe('WebSocket', function() {
27 | it('communicates successfully with echo service', function(done) {
28 | var ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 13, origin: 'http://websocket.org'});
29 | var str = Date.now().toString();
30 | var dataReceived = false;
31 | ws.on('open', function() {
32 | ws.send(str, {mask: true});
33 | });
34 | ws.on('close', function() {
35 | assert.equal(true, dataReceived);
36 | done();
37 | });
38 | ws.on('message', function(data, flags) {
39 | assert.equal(str, data);
40 | ws.terminate();
41 | dataReceived = true;
42 | });
43 | });
44 | });
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/autobahn-server.js:
--------------------------------------------------------------------------------
1 | var WebSocketServer = require('../').Server;
2 |
3 | process.on('uncaughtException', function(err) {
4 | console.log('Caught exception: ', err, err.stack);
5 | });
6 |
7 | process.on('SIGINT', function () {
8 | try {
9 | console.log('Updating reports and shutting down');
10 | var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws');
11 | ws.on('close', function() {
12 | process.exit();
13 | });
14 | }
15 | catch(e) {
16 | process.exit();
17 | }
18 | });
19 |
20 | var wss = new WebSocketServer({port: 8181});
21 | wss.on('connection', function(ws) {
22 | console.log('new connection');
23 | ws.on('message', function(data, flags) {
24 | ws.send(flags.buffer, {binary: flags.binary === true});
25 | });
26 | ws.on('error', function() {
27 | console.log('error', arguments);
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/autobahn.js:
--------------------------------------------------------------------------------
1 | var WebSocket = require('../');
2 | var currentTest = 1;
3 | var lastTest = -1;
4 | var testCount = null;
5 |
6 | process.on('uncaughtException', function(err) {
7 | console.log('Caught exception: ', err, err.stack);
8 | });
9 |
10 | process.on('SIGINT', function () {
11 | try {
12 | console.log('Updating reports and shutting down');
13 | var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws');
14 | ws.on('close', function() {
15 | process.exit();
16 | });
17 | }
18 | catch(e) {
19 | process.exit();
20 | }
21 | });
22 |
23 | function nextTest() {
24 | if (currentTest > testCount || (lastTest != -1 && currentTest > lastTest)) {
25 | console.log('Updating reports and shutting down');
26 | var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws');
27 | ws.on('close', function() {
28 | process.exit();
29 | });
30 | return;
31 | };
32 | console.log('Running test case ' + currentTest + '/' + testCount);
33 | var ws = new WebSocket('ws://localhost:9001/runCase?case=' + currentTest + '&agent=ws');
34 | ws.on('message', function(data, flags) {
35 | ws.send(flags.buffer, {binary: flags.binary === true, mask: true});
36 | });
37 | ws.on('close', function(data) {
38 | currentTest += 1;
39 | process.nextTick(nextTest);
40 | });
41 | ws.on('error', function(e) {});
42 | }
43 |
44 | var ws = new WebSocket('ws://localhost:9001/getCaseCount');
45 | ws.on('message', function(data, flags) {
46 | testCount = parseInt(data);
47 | });
48 | ws.on('close', function() {
49 | if (testCount > 0) {
50 | nextTest();
51 | }
52 | });
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/agent1-cert.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICbjCCAdcCCQCVvok5oeLpqzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
3 | UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
4 | BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA
5 | dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB9
6 | MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
7 | EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G
8 | CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD
9 | gY0AMIGJAoGBAL6GwKosYb0Yc3Qo0OtQVlCJ4208Idw11ij+t2W5sfYbCil5tyQo
10 | jnhGM1CJhEXynQpXXwjKJuIeTQCkeUibTyFKa0bs8+li2FiGoKYbb4G81ovnqkmE
11 | 2iDVb8Gw3rrM4zeZ0ZdFnjMsAZac8h6+C4sB/pS9BiMOo6qTl15RQlcJAgMBAAEw
12 | DQYJKoZIhvcNAQEFBQADgYEAOtmLo8DwTPnI4wfQbQ3hWlTS/9itww6IsxH2ODt9
13 | ggB7wi7N3uAdIWRZ54ke0NEAO5CW1xNTwsWcxQbiHrDOqX1vfVCjIenI76jVEEap
14 | /Ay53ydHNBKdsKkib61Me14Mu0bA3lUul57VXwmH4NUEFB3w973Q60PschUhOEXj
15 | 7DY=
16 | -----END CERTIFICATE-----
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/agent1-key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIICXAIBAAKBgQC+hsCqLGG9GHN0KNDrUFZQieNtPCHcNdYo/rdlubH2Gwopebck
3 | KI54RjNQiYRF8p0KV18IyibiHk0ApHlIm08hSmtG7PPpYthYhqCmG2+BvNaL56pJ
4 | hNog1W/BsN66zOM3mdGXRZ4zLAGWnPIevguLAf6UvQYjDqOqk5deUUJXCQIDAQAB
5 | AoGANu/CBA+SCyVOvRK70u4yRTzNMAUjukxnuSBhH1rg/pajYnwvG6T6F6IeT72n
6 | P0gKkh3JUE6B0bds+p9yPUZTFUXghxjcF33wlIY44H6gFE4K5WutsFJ9c450wtuu
7 | 8rXZTsIg7lAXWjTFVmdtOEPetcGlO2Hpi1O7ZzkzHgB2w9ECQQDksCCYx78or1zY
8 | ZSokm8jmpIjG3VLKdvI9HAoJRN40ldnwFoigrFa1AHwsFtWNe8bKyVRPDoLDUjpB
9 | dkPWgweVAkEA1UfgqguQ2KIkbtp9nDBionu3QaajksrRHwIa8vdfRfLxszfHk2fh
10 | NGY3dkRZF8HUAbzYLrd9poVhCBAEjWekpQJASOM6AHfpnXYHCZF01SYx6hEW5wsz
11 | kARJQODm8f1ZNTlttO/5q/xBxn7ZFNRSTD3fJlL05B2j380ddC/Vf1FT4QJAP1BC
12 | GliqnBSuGhZUWYxni3KMeTm9rzL0F29pjpzutHYlWB2D6ndY/FQnvL0XcZ0Bka58
13 | womIDGnl3x3aLBwLXQJBAJv6h5CHbXHx7VyDJAcNfppAqZGcEaiVg8yf2F33iWy2
14 | FLthhJucx7df7SO2aw5h06bRDRAhb9br0R9/3mLr7RE=
15 | -----END RSA PRIVATE KEY-----
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/ca1-cert.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICazCCAdQCCQC9/g69HtxXRzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV
3 | UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO
4 | BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA
5 | dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB6
6 | MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK
7 | EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqG
8 | SIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
9 | MIGJAoGBAKxr1mARUcv7zaqx5y4AxJPK6c1jdbSg7StcL4vg8klaPAlfNO6o+/Cl
10 | w5CdQD3ukaVUwUOJ4T/+b3Xf7785XcWBC33GdjVQkfbHATJYcka7j7JDw3qev5Jk
11 | 1rAbRw48hF6rYlSGcx1mccAjoLoa3I8jgxCNAYHIjUQXgdmU893rAgMBAAEwDQYJ
12 | KoZIhvcNAQEFBQADgYEAis05yxjCtJRuv8uX/DK6TX/j9C9Lzp1rKDNFTaTZ0iRw
13 | KCw1EcNx4OXSj9gNblW4PWxpDvygrt1AmH9h2cb8K859NSHa9JOBFw6MA5C2A4Sj
14 | NQfNATqUl4T6cdORlcDEZwHtT8b6D4A6Er31G/eJF4Sen0TUFpjdjd+l9RBjHlo=
15 | -----END CERTIFICATE-----
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/ca1-key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN ENCRYPTED PRIVATE KEY-----
2 | MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIFeWxJE1BrRECAggA
3 | MBQGCCqGSIb3DQMHBAgu9PlMSQ+BOASCAoDEZN2tX0xWo/N+Jg+PrvCrFDk3P+3x
4 | 5xG/PEDjtMCAWPBEwbnaYHDzYmhNcAmxzGqEHGMDiWYs46LbO560VS3uMvFbEWPo
5 | KYYVb13vkxl2poXdonCb5cHZA5GUYzTIVVJFptl4LHwBczHoMHtA4FqAhKlYvlWw
6 | EOrdLB8XcwMmGPFabbbGxno0+EWWM27uNjlogfoxj35mQqSW4rOlhZ460XjOB1Zx
7 | LjXMuZeONojkGYQRG5EUMchBoctQpCOM6cAi9r1B9BvtFCBpDV1c1zEZBzTEUd8o
8 | kLn6tjLmY+QpTdylFjEWc7U3ppLY/pkoTBv4r85a2sEMWqkhSJboLaTboWzDJcU3
9 | Ke61pMpovt/3yCUd3TKgwduVwwQtDVTlBe0p66aN9QVj3CrFy/bKAGO3vxlli24H
10 | aIjZf+OVoBY21ESlW3jLvNlBf7Ezf///2E7j4SCDLyZSFMTpFoAG/jDRyvi+wTKX
11 | Kh485Bptnip6DCSuoH4u2SkOqwz3gJS/6s02YKe4m311QT4Pzne5/FwOFaS/HhQg
12 | Xvyh2/d00OgJ0Y0PYQsHILPRgTUCKUXvj1O58opn3fxSacsPxIXwj6Z4FYAjUTaV
13 | 2B85k1lpant/JJEilDqMjqzx4pHZ/Z3Uto1lSM1JZs9SNL/0UR+6F0TXZTULVU9V
14 | w8jYzz4sPr7LEyrrTbzmjQgnQFVbhAN/eKgRZK/SpLjxpmBV5MfpbPKsPUZqT4UC
15 | 4nXa8a/NYUQ9e+QKK8enq9E599c2W442W7Z1uFRZTWReMx/lF8wwA6G8zOPG0bdj
16 | d+T5Gegzd5mvRiXMBklCo8RLxOOvgxun1n3PY4a63aH6mqBhdfhiLp5j
17 | -----END ENCRYPTED PRIVATE KEY-----
18 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/certificate.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICATCCAWoCCQDPufXH86n2QzANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJu
3 | bzETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
4 | cyBQdHkgTHRkMB4XDTEyMDEwMTE0NDQwMFoXDTIwMDMxOTE0NDQwMFowRTELMAkG
5 | A1UEBhMCbm8xEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
6 | IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrQ7
7 | +r//2iV/B6F+4boH0XqFn7alcV9lpjvAmwRXNKnxAoa0f97AjYPGNLKrjpkNXXhB
8 | JROIdbRbZnCNeC5fzX1a+JCo7KStzBXuGSZr27TtFmcV4H+9gIRIcNHtZmJLnxbJ
9 | sIhkGR8yVYdmJZe4eT5ldk1zoB1adgPF1hZhCBMCAwEAATANBgkqhkiG9w0BAQUF
10 | AAOBgQCeWBEHYJ4mCB5McwSSUox0T+/mJ4W48L/ZUE4LtRhHasU9hiW92xZkTa7E
11 | QLcoJKQiWfiLX2ysAro0NX4+V8iqLziMqvswnPzz5nezaOLE/9U/QvH3l8qqNkXu
12 | rNbsW1h/IO6FV8avWFYVFoutUwOaZ809k7iMh2F2JMgXQ5EymQ==
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIICXAIBAAKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEChrR/
3 | 3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0WZxXg
4 | f72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwIDAQAB
5 | AoGAAlVY8sHi/aE+9xT77twWX3mGHV0SzdjfDnly40fx6S1Gc7bOtVdd9DC7pk6l
6 | 3ENeJVR02IlgU8iC5lMHq4JEHPE272jtPrLlrpWLTGmHEqoVFv9AITPqUDLhB9Kk
7 | Hjl7h8NYBKbr2JHKICr3DIPKOT+RnXVb1PD4EORbJ3ooYmkCQQDfknUnVxPgxUGs
8 | ouABw1WJIOVgcCY/IFt4Ihf6VWTsxBgzTJKxn3HtgvE0oqTH7V480XoH0QxHhjLq
9 | DrgobWU9AkEA0TRJ8/ouXGnFEPAXjWr9GdPQRZ1Use2MrFjneH2+Sxc0CmYtwwqL
10 | Kr5kS6mqJrxprJeluSjBd+3/ElxURrEXjwJAUvmlN1OPEhXDmRHd92mKnlkyKEeX
11 | OkiFCiIFKih1S5Y/sRJTQ0781nyJjtJqO7UyC3pnQu1oFEePL+UEniRztQJAMfav
12 | AtnpYKDSM+1jcp7uu9BemYGtzKDTTAYfoiNF42EzSJiGrWJDQn4eLgPjY0T0aAf/
13 | yGz3Z9ErbhMm/Ysl+QJBAL4kBxRT8gM4ByJw4sdOvSeCCANFq8fhbgm8pGWlCPb5
14 | JGmX3/GHFM8x2tbWMGpyZP1DLtiNEFz7eCGktWK5rqE=
15 | -----END RSA PRIVATE KEY-----
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/request.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE REQUEST-----
2 | MIIBhDCB7gIBADBFMQswCQYDVQQGEwJubzETMBEGA1UECAwKU29tZS1TdGF0ZTEh
3 | MB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEB
4 | AQUAA4GNADCBiQKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEC
5 | hrR/3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0W
6 | ZxXgf72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwID
7 | AQABoAAwDQYJKoZIhvcNAQEFBQADgYEAjsUXEARgfxZNkMjuUcudgU2w4JXS0gGI
8 | JQ0U1LmU0vMDSKwqndMlvCbKzEgPbJnGJDI8D4MeINCJHa5Ceyb8c+jaJYUcCabl
9 | lQW5Psn3+eWp8ncKlIycDRj1Qk615XuXtV0fhkrgQM2ZCm9LaQ1O1Gd/CzLihLjF
10 | W0MmgMKMMRk=
11 | -----END CERTIFICATE REQUEST-----
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010 passive.ly LLC
2 |
3 | Permission is hereby granted, free of charge, to any person
4 | obtaining a copy of this software and associated documentation
5 | files (the "Software"), to deal in the Software without
6 | restriction, including without limitation the rights to use,
7 | copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the
9 | Software is furnished to do so, subject to the following
10 | conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 | OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/autotest.watchr:
--------------------------------------------------------------------------------
1 | def run_all_tests
2 | puts `clear`
3 | puts `node tests/test-constants.js`
4 | puts `node tests/test-headers.js`
5 | puts `node tests/test-request.js`
6 | end
7 | watch('.*.js') { run_all_tests }
8 | run_all_tests
9 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/example/demo.js:
--------------------------------------------------------------------------------
1 | var sys = require('util');
2 | var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
3 |
4 | var xhr = new XMLHttpRequest();
5 |
6 | xhr.onreadystatechange = function() {
7 | sys.puts("State: " + this.readyState);
8 |
9 | if (this.readyState == 4) {
10 | sys.puts("Complete.\nBody length: " + this.responseText.length);
11 | sys.puts("Body:\n" + this.responseText);
12 | }
13 | };
14 |
15 | xhr.open("GET", "http://driverdan.com");
16 | xhr.send();
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-constants.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr = new XMLHttpRequest();
5 |
6 | // Test constant values
7 | assert.equal(0, xhr.UNSENT);
8 | assert.equal(1, xhr.OPENED);
9 | assert.equal(2, xhr.HEADERS_RECEIVED);
10 | assert.equal(3, xhr.LOADING);
11 | assert.equal(4, xhr.DONE);
12 |
13 | sys.puts("done");
14 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-events.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , http = require("http")
4 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
5 | , xhr;
6 |
7 | // Test server
8 | var server = http.createServer(function (req, res) {
9 | var body = (req.method != "HEAD" ? "Hello World" : "");
10 |
11 | res.writeHead(200, {
12 | "Content-Type": "text/plain",
13 | "Content-Length": Buffer.byteLength(body)
14 | });
15 | // HEAD has no body
16 | if (req.method != "HEAD") {
17 | res.write(body);
18 | }
19 | res.end();
20 | assert.equal(onreadystatechange, true);
21 | assert.equal(readystatechange, true);
22 | assert.equal(removed, true);
23 | sys.puts("done");
24 | this.close();
25 | }).listen(8000);
26 |
27 | xhr = new XMLHttpRequest();
28 |
29 | // Track event calls
30 | var onreadystatechange = false;
31 | var readystatechange = false;
32 | var removed = true;
33 | var removedEvent = function() {
34 | removed = false;
35 | };
36 |
37 | xhr.onreadystatechange = function() {
38 | onreadystatechange = true;
39 | };
40 |
41 | xhr.addEventListener("readystatechange", function() {
42 | readystatechange = true;
43 | });
44 |
45 | // This isn't perfect, won't guarantee it was added in the first place
46 | xhr.addEventListener("readystatechange", removedEvent);
47 | xhr.removeEventListener("readystatechange", removedEvent);
48 |
49 | xhr.open("GET", "http://localhost:8000");
50 | xhr.send();
51 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr = new XMLHttpRequest();
5 |
6 | // Test request methods that aren't allowed
7 | try {
8 | xhr.open("TRACK", "http://localhost:8000/");
9 | console.log("ERROR: TRACK should have thrown exception");
10 | } catch(e) {}
11 | try {
12 | xhr.open("TRACE", "http://localhost:8000/");
13 | console.log("ERROR: TRACE should have thrown exception");
14 | } catch(e) {}
15 | try {
16 | xhr.open("CONNECT", "http://localhost:8000/");
17 | console.log("ERROR: CONNECT should have thrown exception");
18 | } catch(e) {}
19 | // Test valid request method
20 | try {
21 | xhr.open("GET", "http://localhost:8000/");
22 | } catch(e) {
23 | console.log("ERROR: Invalid exception for GET", e);
24 | }
25 |
26 | // Test forbidden headers
27 | var forbiddenRequestHeaders = [
28 | "accept-charset",
29 | "accept-encoding",
30 | "access-control-request-headers",
31 | "access-control-request-method",
32 | "connection",
33 | "content-length",
34 | "content-transfer-encoding",
35 | "cookie",
36 | "cookie2",
37 | "date",
38 | "expect",
39 | "host",
40 | "keep-alive",
41 | "origin",
42 | "referer",
43 | "te",
44 | "trailer",
45 | "transfer-encoding",
46 | "upgrade",
47 | "user-agent",
48 | "via"
49 | ];
50 |
51 | for (var i in forbiddenRequestHeaders) {
52 | try {
53 | xhr.setRequestHeader(forbiddenRequestHeaders[i], "Test");
54 | console.log("ERROR: " + forbiddenRequestHeaders[i] + " should have thrown exception");
55 | } catch(e) {
56 | }
57 | }
58 |
59 | // Try valid header
60 | xhr.setRequestHeader("X-Foobar", "Test");
61 |
62 | console.log("Done");
63 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-redirect-302.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr = new XMLHttpRequest()
5 | , http = require("http");
6 |
7 | // Test server
8 | var server = http.createServer(function (req, res) {
9 | if (req.url === '/redirectingResource') {
10 | res.writeHead(302, {'Location': 'http://localhost:8000/'});
11 | res.end();
12 | return;
13 | }
14 |
15 | var body = "Hello World";
16 | res.writeHead(200, {
17 | "Content-Type": "text/plain",
18 | "Content-Length": Buffer.byteLength(body),
19 | "Date": "Thu, 30 Aug 2012 18:17:53 GMT",
20 | "Connection": "close"
21 | });
22 | res.write("Hello World");
23 | res.end();
24 |
25 | this.close();
26 | }).listen(8000);
27 |
28 | xhr.onreadystatechange = function() {
29 | if (this.readyState == 4) {
30 | assert.equal(xhr.getRequestHeader('Location'), '');
31 | assert.equal(xhr.responseText, "Hello World");
32 | sys.puts("done");
33 | }
34 | };
35 |
36 | try {
37 | xhr.open("GET", "http://localhost:8000/redirectingResource");
38 | xhr.send();
39 | } catch(e) {
40 | console.log("ERROR: Exception raised", e);
41 | }
42 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-redirect-303.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr = new XMLHttpRequest()
5 | , http = require("http");
6 |
7 | // Test server
8 | var server = http.createServer(function (req, res) {
9 | if (req.url === '/redirectingResource') {
10 | res.writeHead(303, {'Location': 'http://localhost:8000/'});
11 | res.end();
12 | return;
13 | }
14 |
15 | var body = "Hello World";
16 | res.writeHead(200, {
17 | "Content-Type": "text/plain",
18 | "Content-Length": Buffer.byteLength(body),
19 | "Date": "Thu, 30 Aug 2012 18:17:53 GMT",
20 | "Connection": "close"
21 | });
22 | res.write("Hello World");
23 | res.end();
24 |
25 | this.close();
26 | }).listen(8000);
27 |
28 | xhr.onreadystatechange = function() {
29 | if (this.readyState == 4) {
30 | assert.equal(xhr.getRequestHeader('Location'), '');
31 | assert.equal(xhr.responseText, "Hello World");
32 | sys.puts("done");
33 | }
34 | };
35 |
36 | try {
37 | xhr.open("POST", "http://localhost:8000/redirectingResource");
38 | xhr.send();
39 | } catch(e) {
40 | console.log("ERROR: Exception raised", e);
41 | }
42 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-redirect-307.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr = new XMLHttpRequest()
5 | , http = require("http");
6 |
7 | // Test server
8 | var server = http.createServer(function (req, res) {
9 | if (req.url === '/redirectingResource') {
10 | res.writeHead(307, {'Location': 'http://localhost:8000/'});
11 | res.end();
12 | return;
13 | }
14 |
15 | assert.equal(req.method, 'POST');
16 |
17 | var body = "Hello World";
18 | res.writeHead(200, {
19 | "Content-Type": "text/plain",
20 | "Content-Length": Buffer.byteLength(body),
21 | "Date": "Thu, 30 Aug 2012 18:17:53 GMT",
22 | "Connection": "close"
23 | });
24 | res.write("Hello World");
25 | res.end();
26 |
27 | this.close();
28 | }).listen(8000);
29 |
30 | xhr.onreadystatechange = function() {
31 | if (this.readyState == 4) {
32 | assert.equal(xhr.getRequestHeader('Location'), '');
33 | assert.equal(xhr.responseText, "Hello World");
34 | sys.puts("done");
35 | }
36 | };
37 |
38 | try {
39 | xhr.open("POST", "http://localhost:8000/redirectingResource");
40 | xhr.send();
41 | } catch(e) {
42 | console.log("ERROR: Exception raised", e);
43 | }
44 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , http = require("http")
5 | , xhr;
6 |
7 | // Test server
8 | var server = http.createServer(function (req, res) {
9 | // Check request method and URL
10 | assert.equal(methods[curMethod], req.method);
11 | assert.equal("/" + methods[curMethod], req.url);
12 |
13 | var body = (req.method != "HEAD" ? "Hello World" : "");
14 |
15 | res.writeHead(200, {
16 | "Content-Type": "text/plain",
17 | "Content-Length": Buffer.byteLength(body)
18 | });
19 | // HEAD has no body
20 | if (req.method != "HEAD") {
21 | res.write(body);
22 | }
23 | res.end();
24 |
25 | if (curMethod == methods.length - 1) {
26 | this.close();
27 | sys.puts("done");
28 | }
29 | }).listen(8000);
30 |
31 | // Test standard methods
32 | var methods = ["GET", "POST", "HEAD", "PUT", "DELETE"];
33 | var curMethod = 0;
34 |
35 | function start(method) {
36 | // Reset each time
37 | xhr = new XMLHttpRequest();
38 |
39 | xhr.onreadystatechange = function() {
40 | if (this.readyState == 4) {
41 | if (method == "HEAD") {
42 | assert.equal("", this.responseText);
43 | } else {
44 | assert.equal("Hello World", this.responseText);
45 | }
46 |
47 | curMethod++;
48 |
49 | if (curMethod < methods.length) {
50 | sys.puts("Testing " + methods[curMethod]);
51 | start(methods[curMethod]);
52 | }
53 | }
54 | };
55 |
56 | var url = "http://localhost:8000/" + method;
57 | xhr.open(method, url);
58 | xhr.send();
59 | }
60 |
61 | sys.puts("Testing " + methods[curMethod]);
62 | start(methods[curMethod]);
63 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js:
--------------------------------------------------------------------------------
1 | var sys = require("util")
2 | , assert = require("assert")
3 | , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest
4 | , xhr;
5 |
6 | xhr = new XMLHttpRequest();
7 |
8 | xhr.onreadystatechange = function() {
9 | if (this.readyState == 4) {
10 | assert.equal("Hello World", this.responseText);
11 | this.close();
12 | runSync();
13 | }
14 | };
15 |
16 | // Async
17 | var url = "file://" + __dirname + "/testdata.txt";
18 | xhr.open("GET", url);
19 | xhr.send();
20 |
21 | // Sync
22 | var runSync = function() {
23 | xhr = new XMLHttpRequest();
24 |
25 | xhr.onreadystatechange = function() {
26 | if (this.readyState == 4) {
27 | assert.equal("Hello World", this.responseText);
28 | this.close();
29 | sys.puts("done");
30 | }
31 | };
32 | xhr.open("GET", url, false);
33 | xhr.send();
34 | }
35 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/engine.io-client/node_modules/xmlhttprequest/tests/testdata.txt:
--------------------------------------------------------------------------------
1 | Hello World
2 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/.npmignore:
--------------------------------------------------------------------------------
1 | lib-cov
2 | *.seed
3 | *.log
4 | *.csv
5 | *.dat
6 | *.out
7 | *.pid
8 | *.gz
9 |
10 | pids
11 | logs
12 | results
13 |
14 | npm-debug.log
15 | node_modules
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/History.md:
--------------------------------------------------------------------------------
1 |
2 | 0.1.6 / 2015-01-24
3 | ==================
4 |
5 | * fix "undefined function" bug when iterating
6 | an object created with Object.create(null) [gunta]
7 |
8 | 0.1.5 / 2014-09-04
9 | ==================
10 |
11 | * prevent browserify from bundling `Buffer`
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Kevin Roark
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/README.md:
--------------------------------------------------------------------------------
1 | has-binarydata.js
2 | =================
3 |
4 | Simple module to test if an object contains binary data
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/index.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Module requirements.
4 | */
5 |
6 | var isArray = require('isarray');
7 |
8 | /**
9 | * Module exports.
10 | */
11 |
12 | module.exports = hasBinary;
13 |
14 | /**
15 | * Checks for binary data.
16 | *
17 | * Right now only Buffer and ArrayBuffer are supported..
18 | *
19 | * @param {Object} anything
20 | * @api public
21 | */
22 |
23 | function hasBinary(data) {
24 |
25 | function _hasBinary(obj) {
26 | if (!obj) return false;
27 |
28 | if ( (global.Buffer && global.Buffer.isBuffer(obj)) ||
29 | (global.ArrayBuffer && obj instanceof ArrayBuffer) ||
30 | (global.Blob && obj instanceof Blob) ||
31 | (global.File && obj instanceof File)
32 | ) {
33 | return true;
34 | }
35 |
36 | if (isArray(obj)) {
37 | for (var i = 0; i < obj.length; i++) {
38 | if (_hasBinary(obj[i])) {
39 | return true;
40 | }
41 | }
42 | } else if (obj && 'object' == typeof obj) {
43 | if (obj.toJSON) {
44 | obj = obj.toJSON();
45 | }
46 |
47 | for (var key in obj) {
48 | if (Object.prototype.hasOwnProperty.call(obj, key) && _hasBinary(obj[key])) {
49 | return true;
50 | }
51 | }
52 | }
53 |
54 | return false;
55 | }
56 |
57 | return _hasBinary(data);
58 | }
59 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/node_modules/isarray/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "isarray",
3 | "description" : "Array#isArray for older browsers",
4 | "version" : "0.0.1",
5 | "repository" : "juliangruber/isarray",
6 | "homepage": "https://github.com/juliangruber/isarray",
7 | "main" : "index.js",
8 | "scripts" : [
9 | "index.js"
10 | ],
11 | "dependencies" : {},
12 | "keywords": ["browser","isarray","array"],
13 | "author": {
14 | "name": "Julian Gruber",
15 | "email": "mail@juliangruber.com",
16 | "url": "http://juliangruber.com"
17 | },
18 | "license": "MIT"
19 | }
20 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/node_modules/isarray/index.js:
--------------------------------------------------------------------------------
1 | module.exports = Array.isArray || function (arr) {
2 | return Object.prototype.toString.call(arr) == '[object Array]';
3 | };
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/node_modules/isarray/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "isarray",
3 | "description": "Array#isArray for older browsers",
4 | "version": "0.0.1",
5 | "repository": {
6 | "type": "git",
7 | "url": "git://github.com/juliangruber/isarray.git"
8 | },
9 | "homepage": "https://github.com/juliangruber/isarray",
10 | "main": "index.js",
11 | "scripts": {
12 | "test": "tap test/*.js"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "tap": "*"
17 | },
18 | "keywords": [
19 | "browser",
20 | "isarray",
21 | "array"
22 | ],
23 | "author": {
24 | "name": "Julian Gruber",
25 | "email": "mail@juliangruber.com",
26 | "url": "http://juliangruber.com"
27 | },
28 | "license": "MIT",
29 | "_id": "isarray@0.0.1",
30 | "dist": {
31 | "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
32 | "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
33 | },
34 | "_from": "isarray@0.0.1",
35 | "_npmVersion": "1.2.18",
36 | "_npmUser": {
37 | "name": "juliangruber",
38 | "email": "julian@juliangruber.com"
39 | },
40 | "maintainers": [
41 | {
42 | "name": "juliangruber",
43 | "email": "julian@juliangruber.com"
44 | }
45 | ],
46 | "directories": {},
47 | "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
48 | "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
49 | "bugs": {
50 | "url": "https://github.com/juliangruber/isarray/issues"
51 | },
52 | "readme": "ERROR: No README data found!"
53 | }
54 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/has-binary/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "has-binary",
3 | "version": "0.1.6",
4 | "description": "A function that takes anything in javascript and returns true if its argument contains binary data.",
5 | "dependencies": {
6 | "isarray": "0.0.1"
7 | },
8 | "devDependencies": {
9 | "better-assert": "1.0.0",
10 | "mocha": "1.17.1"
11 | },
12 | "author": {
13 | "name": "Kevin Roark"
14 | },
15 | "license": "MIT",
16 | "gitHead": "a37d7ed88fb88e49d5ed1ca15e6cc7dd004dd0e8",
17 | "_id": "has-binary@0.1.6",
18 | "scripts": {},
19 | "_shasum": "25326f39cfa4f616ad8787894e3af2cfbc7b6e10",
20 | "_from": "has-binary@0.1.6",
21 | "_npmVersion": "1.4.28",
22 | "_npmUser": {
23 | "name": "rauchg",
24 | "email": "rauchg@gmail.com"
25 | },
26 | "maintainers": [
27 | {
28 | "name": "rauchg",
29 | "email": "rauchg@gmail.com"
30 | }
31 | ],
32 | "dist": {
33 | "shasum": "25326f39cfa4f616ad8787894e3af2cfbc7b6e10",
34 | "tarball": "http://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz"
35 | },
36 | "directories": {},
37 | "_resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz",
38 | "readme": "ERROR: No README data found!"
39 | }
40 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | .PHONY: clean
12 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # indexOf
3 |
4 | Lame indexOf thing, thanks microsoft
5 |
6 | ## Example
7 |
8 | ```js
9 | var index = require('indexof');
10 | index(arr, obj);
11 | ```
12 |
13 | ## License
14 |
15 | MIT
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "indexof",
3 | "description": "Microsoft sucks",
4 | "version": "0.0.1",
5 | "keywords": ["index", "array", "indexOf"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/index.js:
--------------------------------------------------------------------------------
1 |
2 | var indexOf = [].indexOf;
3 |
4 | module.exports = function(arr, obj){
5 | if (indexOf) return arr.indexOf(obj);
6 | for (var i = 0; i < arr.length; ++i) {
7 | if (arr[i] === obj) return i;
8 | }
9 | return -1;
10 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/indexof/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "indexof",
3 | "description": "Microsoft sucks",
4 | "version": "0.0.1",
5 | "keywords": [
6 | "index",
7 | "array",
8 | "indexOf"
9 | ],
10 | "dependencies": {},
11 | "component": {
12 | "scripts": {
13 | "indexof/index.js": "index.js"
14 | }
15 | },
16 | "_id": "indexof@0.0.1",
17 | "dist": {
18 | "shasum": "82dc336d232b9062179d05ab3293a66059fd435d",
19 | "tarball": "http://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz"
20 | },
21 | "maintainers": [
22 | {
23 | "name": "tjholowaychuk",
24 | "email": "tj@vision-media.ca"
25 | }
26 | ],
27 | "directories": {},
28 | "_shasum": "82dc336d232b9062179d05ab3293a66059fd435d",
29 | "_resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
30 | "_from": "indexof@0.0.1",
31 | "readme": "ERROR: No README data found!"
32 | }
33 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/.npmignore:
--------------------------------------------------------------------------------
1 | components
2 | build
3 | node_modules
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/History.md:
--------------------------------------------------------------------------------
1 |
2 | 0.0.3 / 2012-10-15
3 | ==================
4 |
5 | * package: added `component` namespace (fixes #1)
6 |
7 | 0.0.2 / 2012-09-20
8 | ==================
9 |
10 | * add code smell to `.merge()`
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/Makefile:
--------------------------------------------------------------------------------
1 |
2 | build: components index.js
3 | @component build
4 |
5 | components:
6 | @Component install
7 |
8 | clean:
9 | rm -fr build components template.js
10 |
11 | test:
12 | @./node_modules/.bin/mocha \
13 | --require should \
14 | --reporter spec
15 |
16 | .PHONY: clean test
17 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/Readme.md:
--------------------------------------------------------------------------------
1 |
2 | # object
3 |
4 | Object utils.
5 |
6 | ## API
7 |
8 | ### .keys(obj)
9 |
10 | Return the keys for `obj`.
11 |
12 | ### .values(obj)
13 |
14 | Return the values for `obj`.
15 |
16 | ### .length(obj)
17 |
18 | Return the number of keys for `obj`.
19 |
20 | ### .isEmpty(obj)
21 |
22 | Check if `obj` is empty.
23 |
24 | ### .merge(a, b)
25 |
26 | Merge object `b` into `a`, returns `a`.
27 | Precedence is given to `b`.
28 |
29 | ## License
30 |
31 | MIT
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "object",
3 | "description": "Object keys / values / length",
4 | "version": "0.0.3",
5 | "keywords": ["object", "keys", "utility"],
6 | "dependencies": {},
7 | "scripts": [
8 | "index.js"
9 | ]
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * HOP ref.
4 | */
5 |
6 | var has = Object.prototype.hasOwnProperty;
7 |
8 | /**
9 | * Return own keys in `obj`.
10 | *
11 | * @param {Object} obj
12 | * @return {Array}
13 | * @api public
14 | */
15 |
16 | exports.keys = Object.keys || function(obj){
17 | var keys = [];
18 | for (var key in obj) {
19 | if (has.call(obj, key)) {
20 | keys.push(key);
21 | }
22 | }
23 | return keys;
24 | };
25 |
26 | /**
27 | * Return own values in `obj`.
28 | *
29 | * @param {Object} obj
30 | * @return {Array}
31 | * @api public
32 | */
33 |
34 | exports.values = function(obj){
35 | var vals = [];
36 | for (var key in obj) {
37 | if (has.call(obj, key)) {
38 | vals.push(obj[key]);
39 | }
40 | }
41 | return vals;
42 | };
43 |
44 | /**
45 | * Merge `b` into `a`.
46 | *
47 | * @param {Object} a
48 | * @param {Object} b
49 | * @return {Object} a
50 | * @api public
51 | */
52 |
53 | exports.merge = function(a, b){
54 | for (var key in b) {
55 | if (has.call(b, key)) {
56 | a[key] = b[key];
57 | }
58 | }
59 | return a;
60 | };
61 |
62 | /**
63 | * Return length of `obj`.
64 | *
65 | * @param {Object} obj
66 | * @return {Number}
67 | * @api public
68 | */
69 |
70 | exports.length = function(obj){
71 | return exports.keys(obj).length;
72 | };
73 |
74 | /**
75 | * Check if `obj` is empty.
76 | *
77 | * @param {Object} obj
78 | * @return {Boolean}
79 | * @api public
80 | */
81 |
82 | exports.isEmpty = function(obj){
83 | return 0 == exports.length(obj);
84 | };
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "object-component",
3 | "version": "0.0.3",
4 | "devDependencies": {
5 | "mocha": "*",
6 | "should": "*"
7 | },
8 | "component": {
9 | "scripts": {
10 | "object/index.js": "index.js"
11 | }
12 | },
13 | "readme": "\n# object\n\n Object utils.\n\n## API\n\n### .keys(obj)\n\n Return the keys for `obj`.\n\n### .values(obj)\n\n Return the values for `obj`.\n\n### .length(obj)\n\n Return the number of keys for `obj`.\n\n### .isEmpty(obj)\n\n Check if `obj` is empty.\n\n### .merge(a, b)\n\n Merge object `b` into `a`, returns `a`.\n Precedence is given to `b`.\n\n## License\n\n MIT",
14 | "_id": "object-component@0.0.3",
15 | "description": "Object utils.",
16 | "dist": {
17 | "shasum": "f0c69aa50efc95b866c186f400a33769cb2f1291",
18 | "tarball": "http://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz"
19 | },
20 | "_npmVersion": "1.1.61",
21 | "_npmUser": {
22 | "name": "tjholowaychuk",
23 | "email": "tj@vision-media.ca"
24 | },
25 | "maintainers": [
26 | {
27 | "name": "tjholowaychuk",
28 | "email": "tj@vision-media.ca"
29 | }
30 | ],
31 | "directories": {},
32 | "_shasum": "f0c69aa50efc95b866c186f400a33769cb2f1291",
33 | "_resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
34 | "_from": "object-component@0.0.3"
35 | }
36 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/object-component/test/object.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var object = require('..');
7 |
8 | describe('.keys(obj)', function(){
9 | it('should return the keys of an object', function(){
10 | var obj = { name: 'tobi', age: 1 };
11 | object.keys(obj).should.eql(['name', 'age']);
12 | })
13 | })
14 |
15 | describe('.values(obj)', function(){
16 | it('should return the values of an object', function(){
17 | var obj = { name: 'tobi', age: 1 };
18 | object.values(obj).should.eql(['tobi', 1]);
19 | })
20 | })
21 |
22 | describe('.length(obj)', function(){
23 | it('should return key count', function(){
24 | var obj = { name: 'tobi', age: 1 };
25 | object.length(obj).should.equal(2);
26 | })
27 | })
28 |
29 | describe('.merge(a, b)', function(){
30 | it('should merge two objects', function(){
31 | var a = { foo: 'bar' };
32 | var b = { bar: 'baz' };
33 | object.merge(a, b).should.eql({ foo: 'bar', bar: 'baz' });
34 | })
35 |
36 | it('should give precedence to b', function(){
37 | var a = { foo: 'bar' };
38 | var b = { foo: 'baz' };
39 | object.merge(a, b).should.eql({ foo: 'baz' });
40 | })
41 | })
42 |
43 | describe('.isEmpty()', function(){
44 | it('should check if the object is empty', function(){
45 | object.isEmpty({}).should.be.true;
46 | object.isEmpty({ foo: 'bar' }).should.be.false;
47 | })
48 | })
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/History.md:
--------------------------------------------------------------------------------
1 |
2 | n.n.n / 2014-02-09
3 | ==================
4 |
5 | * parseuri first commit
6 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha test.js
4 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Parses an URI
3 | *
4 | * @author Steven Levithan (MIT license)
5 | * @api private
6 | */
7 |
8 | var re = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
9 |
10 | var parts = [
11 | 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host'
12 | , 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'
13 | ];
14 |
15 | module.exports = function parseuri(str) {
16 | var m = re.exec(str || '')
17 | , uri = {}
18 | , i = 14;
19 |
20 | while (i--) {
21 | uri[parts[i]] = m[i] || '';
22 | }
23 |
24 | return uri;
25 | };
26 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-02-03
3 | ==================
4 |
5 | * Stop using the removed magic __stack global getter
6 |
7 | 0.1.0 / 2012-10-04
8 | ==================
9 |
10 | * add throwing of AssertionError for test frameworks etc
11 |
12 | 0.0.1 / 2010-01-03
13 | ==================
14 |
15 | * Initial release
16 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @echo "populate me"
4 |
5 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/example.js:
--------------------------------------------------------------------------------
1 |
2 | var assert = require('./');
3 |
4 | test();
5 |
6 | function test() {
7 | var user = { name: 'tobi' };
8 | assert('tobi' == user.name);
9 | assert('number' == typeof user.age);
10 | }
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var AssertionError = require('assert').AssertionError
6 | , callsite = require('callsite')
7 | , fs = require('fs')
8 |
9 | /**
10 | * Expose `assert`.
11 | */
12 |
13 | module.exports = process.env.NO_ASSERT
14 | ? function(){}
15 | : assert;
16 |
17 | /**
18 | * Assert the given `expr`.
19 | */
20 |
21 | function assert(expr) {
22 | if (expr) return;
23 |
24 | var stack = callsite();
25 | var call = stack[1];
26 | var file = call.getFileName();
27 | var lineno = call.getLineNumber();
28 | var src = fs.readFileSync(file, 'utf8');
29 | var line = src.split('\n')[lineno-1];
30 | var src = line.match(/assert\((.*)\)/)[1];
31 |
32 | var err = new AssertionError({
33 | message: src,
34 | stackStartFunction: stack[0].getFunction()
35 | });
36 |
37 | throw err;
38 | }
39 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/.npmignore:
--------------------------------------------------------------------------------
1 | support
2 | test
3 | examples
4 | *.sock
5 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2013-01-24
3 | ==================
4 |
5 | * remove lame magical getters
6 |
7 | 0.0.1 / 2010-01-03
8 | ==================
9 |
10 | * Initial release
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/Makefile:
--------------------------------------------------------------------------------
1 |
2 | test:
3 | @./node_modules/.bin/mocha \
4 | --require should
5 |
6 | .PHONY: test
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/Readme.md:
--------------------------------------------------------------------------------
1 | # callstack
2 |
3 | Access to v8's "raw" `CallSite`s.
4 |
5 | ## Installation
6 |
7 | $ npm install callsite
8 |
9 | ## Example
10 |
11 | ```js
12 | var stack = require('callsite');
13 |
14 | foo();
15 |
16 | function foo() {
17 | bar();
18 | }
19 |
20 | function bar() {
21 | baz();
22 | }
23 |
24 | function baz() {
25 | console.log();
26 | stack().forEach(function(site){
27 | console.log(' \033[36m%s\033[90m in %s:%d\033[0m'
28 | , site.getFunctionName() || 'anonymous'
29 | , site.getFileName()
30 | , site.getLineNumber());
31 | });
32 | console.log();
33 | }
34 | ```
35 |
36 | ## Why?
37 |
38 | Because you can do weird, stupid, clever, wacky things such as:
39 |
40 | - [better-assert](https://github.com/visionmedia/better-assert)
41 |
42 | ## License
43 |
44 | MIT
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = function(){
3 | var orig = Error.prepareStackTrace;
4 | Error.prepareStackTrace = function(_, stack){ return stack; };
5 | var err = new Error;
6 | Error.captureStackTrace(err, arguments.callee);
7 | var stack = err.stack;
8 | Error.prepareStackTrace = orig;
9 | return stack;
10 | };
11 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/node_modules/better-assert/node_modules/callsite/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "callsite",
3 | "version": "1.0.0",
4 | "description": "access to v8's CallSites",
5 | "keywords": [
6 | "stack",
7 | "trace",
8 | "line"
9 | ],
10 | "author": {
11 | "name": "TJ Holowaychuk",
12 | "email": "tj@vision-media.ca"
13 | },
14 | "dependencies": {},
15 | "devDependencies": {
16 | "mocha": "*",
17 | "should": "*"
18 | },
19 | "main": "index",
20 | "engines": {
21 | "node": "*"
22 | },
23 | "_id": "callsite@1.0.0",
24 | "dist": {
25 | "shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
26 | "tarball": "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz"
27 | },
28 | "_from": "callsite@1.0.0",
29 | "_npmVersion": "1.2.2",
30 | "_npmUser": {
31 | "name": "tjholowaychuk",
32 | "email": "tj@vision-media.ca"
33 | },
34 | "maintainers": [
35 | {
36 | "name": "tjholowaychuk",
37 | "email": "tj@vision-media.ca"
38 | }
39 | ],
40 | "directories": {},
41 | "_shasum": "280398e5d664bd74038b6f0905153e6e8af1bc20",
42 | "_resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
43 | "readme": "ERROR: No README data found!"
44 | }
45 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/parseuri/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "parseuri",
3 | "version": "0.0.2",
4 | "description": "Method that parses a URI and returns an array of its components",
5 | "scripts": {
6 | "test": "make test"
7 | },
8 | "devDependencies": {
9 | "mocha": "1.17.1"
10 | },
11 | "author": "",
12 | "license": "MIT",
13 | "dependencies": {
14 | "better-assert": "~1.0.0"
15 | },
16 | "_id": "parseuri@0.0.2",
17 | "dist": {
18 | "shasum": "db41878f2d6964718be870b3140973d8093be156",
19 | "tarball": "http://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz"
20 | },
21 | "_from": "parseuri@0.0.2",
22 | "_npmVersion": "1.3.15",
23 | "_npmUser": {
24 | "name": "gal",
25 | "email": "koren@mit.edu"
26 | },
27 | "maintainers": [
28 | {
29 | "name": "gal",
30 | "email": "koren@mit.edu"
31 | }
32 | ],
33 | "directories": {},
34 | "_shasum": "db41878f2d6964718be870b3140973d8093be156",
35 | "_resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.2.tgz",
36 | "readme": "ERROR: No README data found!"
37 | }
38 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/to-array/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log
3 | *.err
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/to-array/LICENCE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Raynos.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/to-array/README.md:
--------------------------------------------------------------------------------
1 | # to-array
2 |
3 | Turn an array like into an array
4 |
5 | ## Example
6 |
7 | ``` js
8 | var toArray = require("to-array")
9 | , elems = document.links
10 |
11 | var array = toArray(elems)
12 | ```
13 |
14 | ## Installation
15 |
16 | `npm install to-array`
17 |
18 | ## Contributors
19 |
20 | - Raynos
21 |
22 | ## MIT Licenced
23 |
--------------------------------------------------------------------------------
/public/js/socket.io-client/node_modules/to-array/index.js:
--------------------------------------------------------------------------------
1 | module.exports = toArray
2 |
3 | function toArray(list, index) {
4 | var array = []
5 |
6 | index = index || 0
7 |
8 | for (var i = index || 0; i < list.length; i++) {
9 | array[i - index] = list[i]
10 | }
11 |
12 | return array
13 | }
14 |
--------------------------------------------------------------------------------