created site just for chat

This commit is contained in:
edbernar
2024-07-30 20:19:29 +02:00
parent 57c261c689
commit 54fb27fe16
1288 changed files with 421 additions and 4240 deletions

13
site/game/node_modules/stats/test/common.js generated vendored Normal file
View File

@ -0,0 +1,13 @@
/**
* Module dependencies.
*/
var should = require('should')
, fs = require('fs');
// load fixture path
global.fixture = function fixture(path) {
return fs.readFileSync(__dirname + '/fixtures/' + path, 'utf8');
};

8
site/game/node_modules/stats/test/fixtures/arrays.js generated vendored Normal file
View File

@ -0,0 +1,8 @@
var foo = [
'bar',
'baz',
'raz'
];
foo.push(['foo', 'bar', 'baz']);

View File

@ -0,0 +1,8 @@
/**
* testing stuff.
*
* @param {Type} name
* @return {Type}
* @api public
*/

View File

@ -0,0 +1,18 @@
function foo() {
console.log('test');
}
function bar() {
console.log('test');
}
var baz = function(){
console.log('stuff');
};
global = function(){
console.log('foo');
console.log('bar');
console.log('baz');
}

11
site/game/node_modules/stats/test/fixtures/http.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var http = require('http');
http.createServer(function(req, res){
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
}).listen(3000);

65
site/game/node_modules/stats/test/fixtures/large.js generated vendored Normal file
View File

@ -0,0 +1,65 @@
/*!
* jss
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var parse = require('uglify-js').parser.parse;
/**
* Library version.
*/
exports.version = '0.0.1';
/**
* Return stats for the given javascript `str`.
*
* @param {String} str
* @return {Object}
* @api public
*/
exports.stats = function(str){
var stats = {
statements: 0
, assignments: 0
, functions: 0
, numbers: 0
, strings: 0
, stringBytes: 0
, loc: str.split('\n').length
, bytes: Buffer.byteLength(str)
};
function visit(node) {
if (!node) return;
var name = node[0];
// array support
if ('string' != typeof name) {
for (var i = 0, len = node.length; i < len; ++i) {
visit(node[i]);
}
return;
}
// rename "name" to "ident"
if ('name' == name) name = 'ident';
// visit the node
if (!visit[name]) throw new Error('no visitor implemented for "' + name + '"');
visit[name](node);
}
visit['toplevel'] = function(node){
visit(node[1]);
};
return stats;
};

View File

@ -0,0 +1,9 @@
var foo = { foo: 'bar' };
var tj = {
first: 'tj'
, last: 'holowaychuk'
};
tj = new User(tj);

View File

@ -0,0 +1,5 @@
#!/usr/bin/env node
console.log('foo')
console.log('bar')
console.log('baz')

9
site/game/node_modules/stats/test/fixtures/simple.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
var foo = 'foo'
, bar = 'bar'
, baz = 'baz'
, test;
console.log(foo = 'hey');
console.log(bar);
console.log(baz);

9
site/game/node_modules/stats/test/fixtures/switch.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
switch ('foo') {
case 'foo':
console.log('foo');
break;
case 'bar':
console.log('bar');
break;
}

9
site/game/node_modules/stats/test/fixtures/while.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
out: while (foo) {
if (bar) continue;
break out;
}
do {
console.log(foo);
} while(bar);

5
site/game/node_modules/stats/test/fixtures/with.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
with (foo) {
bar();
baz();
}

16
site/game/node_modules/stats/test/run generated vendored Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
export NODE_ENV=test
echo
for file in $@; do
printf "\033[90m ${file#test/}\033[0m "
node $file 2> /tmp/stderr && echo "\033[36m✓\033[0m"
code=$?
if test $code -ne 0; then
echo "\033[31m✖\033[0m"
cat /tmp/stderr >&2
exit $code
fi
done
echo

11
site/game/node_modules/stats/test/test.arrays.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('arrays.js'));
stats.should.have.property('arrayLiterals', 2);
stats.should.have.property('strings', 6);

11
site/game/node_modules/stats/test/test.comments.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('comments.js'));
stats.should.have.property('statements', 0);
stats.should.have.property('loc', 8);

11
site/game/node_modules/stats/test/test.forin.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('for (var key in val) "hey";');
stats.should.have.property('statements', 2);
stats.should.have.property('strings', 1);

12
site/game/node_modules/stats/test/test.functions.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('functions.js'));
stats.should.have.property('statements', 10);
stats.should.have.property('assignments', 2);
stats.should.have.property('functions', 4);

15
site/game/node_modules/stats/test/test.http.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('http.js'));
stats.should.have.property('strings', 4);
stats.should.have.property('numbers', 1);
stats.should.have.property('statements', 4);
stats.should.have.property('assignments', 1);
stats.should.have.property('stringBytes', 38);
stats.should.have.property('loc', 11);

15
site/game/node_modules/stats/test/test.large.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('large.js'));
stats.should.have.property('statements', 16);
stats.should.have.property('assignments', 9);
stats.should.have.property('loc', 65);
stats.should.have.property('objectLiterals', 1);
stats.should.have.property('objectsCreated', 1);
stats.should.have.property('throws', 1);

11
site/game/node_modules/stats/test/test.objects.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('objects.js'));
stats.should.have.property('objectLiterals', 2);
stats.should.have.property('objectsCreated', 1);

9
site/game/node_modules/stats/test/test.postfix.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('foo++');

11
site/game/node_modules/stats/test/test.regexp.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('foo.text(/something/)');
stats.should.have.property('statements', 1);
stats.should.have.property('regexpLiterals', 1);

11
site/game/node_modules/stats/test/test.sequence.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('("foo", "bar", "baz")');
stats.should.have.property('statements', 1);
stats.should.have.property('strings', 3);

10
site/game/node_modules/stats/test/test.shebang.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('shebang.js'));
stats.should.have.property('statements', 3);

15
site/game/node_modules/stats/test/test.simple.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
stats.should.have.property('version');
var stats = stats.parse(fixture('simple.js'));
stats.should.have.property('statements', 4);
stats.should.have.property('assignments', 4);
stats.should.have.property('loc', 9);
stats.should.have.property('bytes', 121);

10
site/game/node_modules/stats/test/test.switch.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('switch.js'));
stats.should.have.property('statements', 5);

11
site/game/node_modules/stats/test/test.ternary.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('"foo" ? "bar" : "baz"');
stats.should.have.property('statements', 1);
stats.should.have.property('strings', 3);

11
site/game/node_modules/stats/test/test.trycatch.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse('try { "test" } catch (err) { "testing" }');
stats.should.have.property('statements', 3);
stats.should.have.property('strings', 2);

10
site/game/node_modules/stats/test/test.while.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('while.js'));
stats.should.have.property('statements', 5);

10
site/game/node_modules/stats/test/test.with.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
/**
* Module dependencies.
*/
var stats = require('../')
, common = require('./common');
var stats = stats.parse(fixture('with.js'));
stats.should.have.property('statements', 3);