Removed GopherJS, basic frontend completed, need backend changes for

torrent storage
This commit is contained in:
2017-11-30 18:12:11 -05:00
parent 67fdef16b1
commit e98ad2cc88
69321 changed files with 5498914 additions and 337 deletions

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof Symbol, 'function'); };

View File

@@ -0,0 +1,12 @@
'use strict';
var d = require('d')
, defineProperty = Object.defineProperty;
module.exports = function (T, a) {
var symbol = T('test'), x = {};
defineProperty(x, symbol, d('foo'));
a(x.test, undefined, "Name");
a(x[symbol], 'foo', "Get");
};

View File

@@ -0,0 +1,14 @@
'use strict';
var global = require('es5-ext/global')
, polyfill = require('../polyfill');
module.exports = function (t, a) {
var cache;
a(typeof t(), 'boolean');
cache = global.Symbol;
global.Symbol = polyfill;
a(t(), true);
if (cache === undefined) delete global.Symbol;
else global.Symbol = cache;
};

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t, 'boolean'); };

View File

@@ -0,0 +1,16 @@
'use strict';
var SymbolPoly = require('../polyfill');
module.exports = function (t, a) {
a(t(undefined), false, "Undefined");
a(t(null), false, "Null");
a(t(true), false, "Primitive");
a(t('raz'), false, "String");
a(t({}), false, "Object");
a(t([]), false, "Array");
if (typeof Symbol !== 'undefined') {
a(t(Symbol()), true, "Native");
}
a(t(SymbolPoly()), true, "Polyfill");
};

View File

@@ -0,0 +1,29 @@
'use strict';
var d = require('d')
, isSymbol = require('../is-symbol')
, defineProperty = Object.defineProperty;
module.exports = function (T, a) {
var symbol = T('test'), x = {};
defineProperty(x, symbol, d('foo'));
a(x.test, undefined, "Name");
a(x[symbol], 'foo', "Get");
a(x instanceof T, false);
a(isSymbol(symbol), true, "Symbol");
a(isSymbol(T.iterator), true, "iterator");
a(isSymbol(T.toStringTag), true, "toStringTag");
x = {};
x[symbol] = 'foo';
if (typeof symbol !== 'symbol') {
a.deep(Object.getOwnPropertyDescriptor(x, symbol), { configurable: true, enumerable: false,
value: 'foo', writable: true });
}
symbol = T.for('marko');
a(isSymbol(symbol), true);
a(T.for('marko'), symbol);
a(T.keyFor(symbol), 'marko');
};

View File

@@ -0,0 +1,19 @@
'use strict';
var SymbolPoly = require('../polyfill');
module.exports = function (t, a) {
var symbol;
a.throws(function () { t(undefined); }, TypeError, "Undefined");
a.throws(function () { t(null); }, TypeError, "Null");
a.throws(function () { t(true); }, TypeError, "Primitive");
a.throws(function () { t('raz'); }, TypeError, "String");
a.throws(function () { t({}); }, TypeError, "Object");
a.throws(function () { t([]); }, TypeError, "Array");
if (typeof Symbol !== 'undefined') {
symbol = Symbol();
a(t(symbol), symbol, "Native");
}
symbol = SymbolPoly();
a(t(symbol), symbol, "Polyfill");
};