mirror of
https://github.com/arnaucube/comunicationLeap.git
synced 2026-02-07 03:16:45 +01:00
nodejs with express server, leapmotion for movement control, and threejs for 3d render
This commit is contained in:
15
node_modules/has-binary/.npmignore
generated
vendored
Normal file
15
node_modules/has-binary/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
node_modules
|
||||
5
node_modules/has-binary/History.md
generated
vendored
Normal file
5
node_modules/has-binary/History.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
0.1.5 / 2014-09-04
|
||||
==================
|
||||
|
||||
* prevent browserify from bundling `Buffer`
|
||||
20
node_modules/has-binary/LICENSE
generated
vendored
Normal file
20
node_modules/has-binary/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Kevin Roark
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
3
node_modules/has-binary/Makefile
generated
vendored
Normal file
3
node_modules/has-binary/Makefile
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
test:
|
||||
@./node_modules/.bin/mocha test.js
|
||||
4
node_modules/has-binary/README.md
generated
vendored
Normal file
4
node_modules/has-binary/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
has-binarydata.js
|
||||
=================
|
||||
|
||||
Simple module to test if an object contains binary data
|
||||
1
node_modules/has-binary/fixtures/big.json
generated
vendored
Normal file
1
node_modules/has-binary/fixtures/big.json
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
58
node_modules/has-binary/index.js
generated
vendored
Normal file
58
node_modules/has-binary/index.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
/*
|
||||
* Module requirements.
|
||||
*/
|
||||
|
||||
var isArray = require('isarray');
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = hasBinary;
|
||||
|
||||
/**
|
||||
* Checks for binary data.
|
||||
*
|
||||
* Right now only Buffer and ArrayBuffer are supported..
|
||||
*
|
||||
* @param {Object} anything
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function hasBinary(data) {
|
||||
|
||||
function _hasBinary(obj) {
|
||||
if (!obj) return false;
|
||||
|
||||
if ( (global.Buffer && global.Buffer.isBuffer(obj)) ||
|
||||
(global.ArrayBuffer && obj instanceof ArrayBuffer) ||
|
||||
(global.Blob && obj instanceof Blob) ||
|
||||
(global.File && obj instanceof File)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isArray(obj)) {
|
||||
for (var i = 0; i < obj.length; i++) {
|
||||
if (_hasBinary(obj[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (obj && 'object' == typeof obj) {
|
||||
if (obj.toJSON) {
|
||||
obj = obj.toJSON();
|
||||
}
|
||||
|
||||
for (var key in obj) {
|
||||
if (obj.hasOwnProperty(key) && _hasBinary(obj[key])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return _hasBinary(data);
|
||||
}
|
||||
64
node_modules/has-binary/package.json
generated
vendored
Normal file
64
node_modules/has-binary/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"has-binary@0.1.5",
|
||||
"C:\\Users\\esanvin\\Desktop\\multi\\NodeServer\\node_modules\\socket.io-client"
|
||||
]
|
||||
],
|
||||
"_from": "has-binary@0.1.5",
|
||||
"_id": "has-binary@0.1.5",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/has-binary",
|
||||
"_npmUser": {
|
||||
"email": "rauchg@gmail.com",
|
||||
"name": "rauchg"
|
||||
},
|
||||
"_npmVersion": "1.4.25",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "has-binary",
|
||||
"raw": "has-binary@0.1.5",
|
||||
"rawSpec": "0.1.5",
|
||||
"scope": null,
|
||||
"spec": "0.1.5",
|
||||
"type": "version"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/socket.io-client"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz",
|
||||
"_shasum": "95e75720ff31b72a3ba89a5b6dce082e4bc6467f",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "has-binary@0.1.5",
|
||||
"_where": "C:\\Users\\esanvin\\Desktop\\multi\\NodeServer\\node_modules\\socket.io-client",
|
||||
"author": {
|
||||
"name": "Kevin Roark"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": "0.0.1"
|
||||
},
|
||||
"description": "A function that takes anything in javascript and returns true if its argument contains binary data.",
|
||||
"devDependencies": {
|
||||
"better-assert": "1.0.0",
|
||||
"mocha": "1.17.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "95e75720ff31b72a3ba89a5b6dce082e4bc6467f",
|
||||
"tarball": "http://registry.npmjs.org/has-binary/-/has-binary-0.1.5.tgz"
|
||||
},
|
||||
"gitHead": "9034d3f6822521245b2507633b7d4eb54dc5ec91",
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"email": "rauchg@gmail.com",
|
||||
"name": "rauchg"
|
||||
}
|
||||
],
|
||||
"name": "has-binary",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"scripts": {},
|
||||
"version": "0.1.5"
|
||||
}
|
||||
108
node_modules/has-binary/test.js
generated
vendored
Normal file
108
node_modules/has-binary/test.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
|
||||
var hasBinary = require('./');
|
||||
var assert = require('better-assert');
|
||||
var fs = require('fs');
|
||||
|
||||
var start = new Date();
|
||||
|
||||
describe('has-binarydata', function(){
|
||||
|
||||
it('should work with buffer', function(){
|
||||
assert(hasBinary(fs.readFileSync('./test.js')));
|
||||
});
|
||||
|
||||
it('should work with an array that does not contain binary', function() {
|
||||
var arr = [1, 'cool', 2];
|
||||
assert(!hasBinary(arr));
|
||||
});
|
||||
|
||||
it('should work with an array that contains a buffer', function() {
|
||||
var arr = [1, new Buffer('asdfasdf', 'utf8'), 2];
|
||||
assert(hasBinary(arr));
|
||||
});
|
||||
|
||||
it('should work with an object that does not contain binary', function() {
|
||||
var ob = {a: 'a', b: [], c: 1234};
|
||||
assert(!hasBinary(ob));
|
||||
});
|
||||
|
||||
it('should work with an object that contains a buffer', function() {
|
||||
var ob = {a: 'a', b: new Buffer('abc'), c: 1234};
|
||||
assert(hasBinary(ob));
|
||||
});
|
||||
|
||||
it('should work with null', function() {
|
||||
assert(!hasBinary(null));
|
||||
});
|
||||
|
||||
it('should work with undefined', function() {
|
||||
assert(!hasBinary(undefined));
|
||||
});
|
||||
|
||||
it('should work with a complex object that contains undefined and no binary', function() {
|
||||
var ob = {
|
||||
x: ['a', 'b', 123],
|
||||
y: undefined,
|
||||
z: {a: 'x', b: 'y', c: 3, d: null},
|
||||
w: []
|
||||
};
|
||||
assert(!hasBinary(ob));
|
||||
});
|
||||
|
||||
it('should work with a complex object that contains undefined and binary', function() {
|
||||
var ob = {
|
||||
x: ['a', 'b', 123],
|
||||
y: undefined,
|
||||
z: {a: 'x', b: 'y', c: 3, d: null},
|
||||
w: [],
|
||||
bin: new Buffer('xxx')
|
||||
};
|
||||
assert(hasBinary(ob));
|
||||
});
|
||||
|
||||
it('should handle a very large json object with no binary', function(done) {
|
||||
this.timeout();
|
||||
fs.readFile(__dirname + '/fixtures/big.json', function(err, data) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
assert(false);
|
||||
}
|
||||
data = JSON.parse(data);
|
||||
assert(!hasBinary(data));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle a very large json object with binary', function(done) {
|
||||
this.timeout();
|
||||
fs.readFile(__dirname + '/fixtures/big.json', function(err, data) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
assert(false);
|
||||
}
|
||||
var ob = JSON.parse(data);
|
||||
ob.bin = {bin: {bin: {bin: new Buffer('abc')}}};
|
||||
assert(hasBinary(ob));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
if (global.ArrayBuffer) {
|
||||
it('should work with an ArrayBuffer', function() {
|
||||
assert(hasBinary(new ArrayBuffer()));
|
||||
});
|
||||
}
|
||||
|
||||
if (global.Blob) {
|
||||
it('should work with a Blob', function() {
|
||||
assert(hasBinary(new Blob()));
|
||||
});
|
||||
}
|
||||
|
||||
it('should print the test time', function() {
|
||||
var end = new Date();
|
||||
var diff = end - start;
|
||||
console.log('\ntest time: ' + diff + ' ms');
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user